MapThat – Spatial Export: The Export Has Failed

Marketing
Marketing
  • Updated

by David Crowther

 

MapThat_Spatial_Export_DC_01.png

Question:

How do I resolve the error message - ‘The Export Has Failed’ – when using the Export to GIS tool  in MapThat?

MapThat_Spatial_Export_DC_02.jpg

Answer:

MapThat has the ability (Role and Layer  dependent) to export your Layers into a Flat GIS Format e.g. SHP, TAB, DXF, KML,  GeoJSON. Simply load the MapThat Layer and in the Data Table choose the Export to GIS button.

MapThat_Spatial_Export_DC_03.jpg

MapThat_Spatial_Export_DC_04.jpg

However the export may fail if the MapThat Server has not been correctly configured.

MapThat_Spatial_Export_DC_05.jpg

Please check these points:

1 – In the MapThat Page Settings (VE_WEB_CONFIG) ensure that the OGR2OGR_PATH is pointing to a valid installation of OSGEOW and point to the Ogr2Ogr folder.

OSGEOW (Ogr2Ogr) is used to run the spatial export from the MapThat Spatial Database to create the Flat GIS File.

MapThat_Spatial_Export_DC_06.jpg

2 – Check that the Export.BAT file and its folder are not ReadOnly.

The MapThat > Export to GIS > will edit the Export.BAT file stored in the /BATCHFILES/ folder of your MapThat Instance. The Export.BAT file is updated each time a user does an Export with the new sport details e.g. the MapThat Layer Name and the export file name and GIS File Format.

MapThat_Spatial_Export_DC_07.jpg

Ensure that the folder and the file itself are not ticked as Read Only.

MapThat_Spatial_Export_DC_08.jpg

Also you may need to ensure in the Security Settings that the MapThat User Profile is Allowed Access to Modify, Write to this File/Folder.

MapThat_Spatial_Export_DC_09.jpg

3 – When the Export is ran it will save the resultant GIS File in the MapThat /SpatialExport/ Folder. So again, make sure that the /SpatialExport/ folder is not ticked as ReadOnly and that Users can write into this folder.

MapThat_Spatial_Export_DC_10.jpg

4 – Finally, if the Spatial Data is in another Map Projection e.g. 4326, Ogr2Ogr will need to be able to access a Coordinate Projections file which is stored in the OSGEOW folder. If Ogr2Ogr cannot access this file it will fail when the Spatial Export runs. For example if we look in the MapThat Error Log table, a common error message for Failed GIS Exports will be:

MapThat_Spatial_Export_DC_11.jpg

Og2Ogr needs access to the GCS.CSV file stored in the SHARE/GDAL/ folder in your OSGEOW install.

MapThat_Spatial_Export_DC_12.jpg

The error message in MapThat is stating that Ogr2Ogr cant access the GCS.CSV file, so the export fails. To resolve this you simply need to create a SYSTEM VARIABLE pointing to this folder.

On the MapThat Application Server go into the Computer > Advanced Settings and choose Environment Variables.

MapThat_Spatial_Export_DC_13.jpg

And ADD a SYSTEM VARIABLE called GDAL_DATA pointing to your Instance of OSGEOW and in particular the SHARE/GDAL folder. In the example below we are actually referencing the Instance of PostgreSQL ……

MapThat_Spatial_Export_DC_14.jpg

….which also has a folder containing the required GCS.CSV file.

MapThat_Spatial_Export_DC_15.jpg

Alternately, point your new System Variable to the /SHARE/GDAL/ folder of your OSGEOW install.

MapThat_Spatial_Export_DC_16.jpg

For this new Environment (System) Variable to take affect you will need to RESTART the Server!

Now when a User chooses the Export to GIS tool in MapThat the Layer will successfully be exported to the chosen file format.

MapThat_Spatial_Export_DC_17.jpg

 

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.