Donnerstag, 28. August 2014

Convert MapGuide 6.5 redlining objects

We are migrating MapGuide 6.5 to AIMS 2013. For one of the projects a user has digitized quite a few features as redlining objects and then saved the map locally as mwf file.

MapGuide 6.5 - redlining objects saved in mwf file

MapGuide 6.5 - redlining objects saved in mwf file - detail

Unfortunately there is no function in MapGuide Author to save the redlining objects as SDF nor did I find any other way to convert the redlining objects into a more useful data format. 

Jackie Ng suggested to use the MG Viewer API to convert the redlining objects to GeoJSON. That really was a very helpful suggestion - I have never done anything before with JSON and it was easy exporting the data as JSON using only a view lines of JavaScript. It's a quick and dirty solution - the html files can be downloaded here. It is kept simple without any checks - our maps only contain lines and text. Still it took me a while to get used to JS again and to write code in an text editor without any code completion.

GeoJson can be loaded directly into QGIS:

converted redlinige objects in QGIS...

or processed further in FME. I created a SDF3 file and loaded the file into Map. Objects can be labelled as before:

... and finally in Map

Keine Kommentare:

Kommentar veröffentlichen