30. November 2018
mika
programming
Depending on a scenario simply paste the code below into the Immediate Window
If you happen to use Newtonsoft.Json:
System.IO.File.WriteAllText(@"c:\temp\debug_dump.json", Newtonsoft.Json.JsonConvert.SerializeObject(obj))
No json serializer? Try xml serializer then:
(new System.Xml.Serialization.XmlSerializer(obj.GetType())).Serialize(new System.IO.StreamWriter(@"c:\temp\debug_dump.xml"), obj)
Obviously the above will throw if an object is not serializable
Just a couple clips from our Dutch partners - NatuurNetwerk. This is an example of an app written by cartomatic and used for the wildlife resource managment i Holland by rangers, police forces, etc.
- Navigation, search, measure tools; hystorical ortho imagery
More...
Just a couple of videos featuring our new geoCMS platform released a couple of months ago. This is a web GIS based application designed to easily create, manage and publish spatial data.
Currently there are three modules available: geooportal, geoCMS and a mobile application. The first two work together as a spatial data publishing tool. One can create and manage vector layers, layer groups and maps along with the tools that are available for each map. The standard WMS or XYZ raster data sources can also be easily consumed by the geoportal.
The mobile application is used for outdoor data collection - it is also a map centric app that drastically improves the efficiency of the outdoor data collection and managment process.
All modules exchange data in real time. When there is no Internet access, the mobile device stores the data localy and then synchronises it with the database as needed.
A live example may be found here: http://cyklisci.maphive.co/. This is an application powered by our platform - this particular one focuses on hGIS, old maps and such.
Another example: http://cyklisci.maphive.co/. This one focusing on collecting data from geoportal users.
- Navigation tools
More...
You may sometime need to export all the components of given type so they can be used in another GIS environment. Here goes a script that does exactly this. The example exports all the drawings and tables to either shp or xls:
using Manifold.Interop.Scripts;
using M = Manifold.Interop;
class Script {
static void Main() {
//Some setup stuff first
string exportFld = "H:\\ExportedComponents\\";
M.Application mApp = Context.Application;
M.Document mDoc = (M.Document)mApp.ActiveDocument;
M.ComponentSet mCompSet = mDoc.ComponentSet;
//Exporters
M.ExportShp shpExporter = (M.ExportShp)mApp.NewExport("SHP");
shpExporter.ConvertPolicy = M.ConvertPolicy.ConvertAll;
M.ExportXls xlsExporter = (M.ExportXls)mApp.NewExport("XLS");
xlsExporter.ConvertPolicy = M.ConvertPolicy.ConvertAll;
//iterate through all components
for (int i = 0; i < mCompSet.Count; i++ )
{
mApp.StatusText = "Reading component " + i.ToString() + " of " + mCompSet.Count;
switch (mCompSet[i].Type)
{
case M.ComponentType.ComponentDrawing:
shpExporter.Export(mCompSet[i], exportFld + mCompSet[i].Name + shpExporter.DefaultExtension, M.ConvertPrompt.PromptNone);
break;
case M.ComponentType.ComponentTable:
xlsExporter.Export(mCompSet[i], exportFld + mCompSet[i].Name + xlsExporter.DefaultExtension, M.ConvertPrompt.PromptNone);
break;
}
}
mApp.StatusText = "";
mApp.MessageBox("Done!", "Info");
}
}
It's been a while since the last post appeared here so this one will be rather longish ;-)
Recently in one of our projects we had a requirement to allow users to upload their images to the database so they can later be viewed by other users of the application.
For the clientside we used the ExtJs framework while the serverside was ASP.NET and c#.
Basically the process can be divided into three parts: image upload on the clientside, image processing on the server side and also image retrieval from the database so it can be displayed again in a browser.
More...