Export Vector to OSM Exception
RSVector
Global Mapper UserTrusted User
When attempting to to Export Vector to OSM, I get the following exception:
Unhandled exception processing command message.
Read access violation at data address 0xFFFFFFF1,
program address 0x7862F7A6.
Version: v14.2.0
Build Time: May 22 2013 14:47:03
Unhandled exception processing command message.
Read access violation at data address 0xFFFFFFF1,
program address 0x7862F7A6.
Version: v14.2.0
Build Time: May 22 2013 14:47:03
Comments
-
Can you try the latest v15 trial from Global Mapper Downloads and see if it still has the same error? You can request a trial from right on the registration dialog.
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Global Mapper -
I get pretty much the same error.
Unhandled exception processing command message 33949 with code 0.
Read access violation at data address 0xFFFFFFF1,
program address 0x7862F7A6.
Version: v15.1.8
Build Time: Mar 31 2014 21:59:15
P.S. Is V15 optimized for speed over V14.2, it seems to load faster. -
Also wondering if the Export to OSM will be available through the scripting language sometime soon?
-
I just tried an OSM export with vector in the latest build and it worked fine. Also the latest build has a new EXPORT_WEB script command that allows export to OSM tiles from a script. I have placed a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper15.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v15.xx installation folder to give it a try. If you are using the 64-bit v15 version there is a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper15_64bit.zip .
Here is the documentation of the EXPORT_WEB command:
EXPORT_WEB
The EXPORT_WEB command exports all currently loaded data to a tiled web format. The following parameters are supported by the command.
FILENAME - output file name. For Google Maps, Bing, and OSM, this is the name of the HTML file that will be used to display the tiles. For TMS, this is the name of the XML file that contains the tile info. For KML Raster, this is the name of the KML/KMZ file. For MBTiles, this is the name of the SQLite database, with an extension of ".mbtiles". For RMaps, this is the name of the SQLite database, with an extension of ".sqlite". In all of these cases, the EXPORT_WEB command will create a new output file.
TYPE - type of vector file we're exporting to
GOOGLE_MAPS - Google Maps Tiles
VIRTUAL_EARTH - Bing/Virtual Earth Tiles
KML_RASTER - KML file with all data in a raster
WORLDWIND - World Wind Tiles
TMS - Tile Mapping Service tiles
OSM - Open Street Maps Tiles
MBTILES - MapBox MBTiles SQLite Database
RMAPS - RMaps SQLite Database
Specify Bounding Box for Operation
Cropping to Polygons/Areas
MAX_ZOOM_LEVEL - highest zoom level for which tiles will be created. Valid zoom levels, and associated resolution using the default 256 x 256 pixel tiles are:
3 - 19568 meters/pixel
4 - 9784 meters/pixel
5 - 4892 meters/pixel
6 - 2446 meters/pixel
7 - 1223 meters/pixel
8 - 611 meters/pixel
9 - 306 meters/pixel
10 - 153 meters/pixel
11 - 76 meters/pixel
12 - 38 meters/pixel
13 - 19 meters/pixel
14 - 9.6 meters/pixel
15 - 4.8 meters/pixel
16 - 2.4 meters/pixel
17 - 1.19 meters/pixel
18 - 0.60 meters/pixel
19 - 0.30 meters/pixel
20 - 0.15 meters/pixel
21 - 0.07 meters/pixel
22 - 0.04 meters/pixel
23 - 0.02 meters/pixel
NUM_ZOOM_LEVELS - contains the number of zoom levels to be created. The default is 5.
MAP_NAME - user-defined name for the map.
IMAGE_FORMAT is the format to be used for the images. Choices are "PNG" and "JPG". The default is "PNG".
BG_MAP_NAME - type of map to use as the background (Google Maps tiles only):
ROADMAP - Road map
SATELLITE - Satellite imagery
HYBRID - Combination of ROADMAP and SATELLITE
TERRAIN - Terrain map
TRANSLUCENCY - amount of translucency for the tiles. The value must be between 0.0 and 1.0. 1.0 is Opaque, and the image gets more translucent as the numbers get lower. 0.0 is treated the same as 1.0. The default is 1.0.
TILE_PATH - contains the directory where the tiles should be stored. If this is not specified, the tiles will be written to the directory specified for the FILENAME parameter.
CUSTOM_TILE_FILENAME - custom definition for tile filenames. Use variables %z for zoom, %x for column, and %y for row. For example, use "%z\\prefix_%y_%x.png" to create one folder per zoom level. The tiles will be created in the path under the HTML filename path.
MBT_DESCRIPTION - map description that will be added to the MBTiles metadata (MBTiles only).
MBT_MAP_TYPE - indicates the type of map (MBTiles only). Valid values are (default is "overlay"):
basemap - This map will be the base map.
overlay - This map will overlay another map.
SPATIAL_RES - specifies spatial resolution. Defaults to the minimum spatial resolution of the two layers if not specified. Should be formatted as x_resolution,y_resolution. The units are the units of the current global projection. For example, if UTM was the current global projection and you wanted to export at 30 meter spacing, the parameter/value pair would look like SPATIAL_RES=30.0,30.0. You can also specify as a percentage of the default resolution by adding a percent. For example to get half the detail your double the spatial resolution value, so you would use SPATIAL_RES="200%,200%".
SPATIAL_RES_METERS - specifies spatial resolution to use in meters. The value in meters will automatically be converted to the curent view/export projection units. For example, to do an export at 2.0 meter spacing (or as close as you can get to that in the current units), use SPATIAL_RES_METERS=2.0, or to do an export at 1.0 meters in X by 1.5 meters in Y, use SPATIAL_RES_METERS="1.0,1.5".
PIXEL_SIZE - specifies the desired size in pixels of your export. Use this instead of SPATIAL_RES if you know exactly how many pixels in size your export should be. The format is PIXEL_SIZE="widthxheight". For example, to make your export have dimensions of 1024 pixels wide by 768 pixels tall, use PIXEL_SIZE="1024x768".
The following parameters require boolean values ("YES" or "NO") to turn on or off the associated option (the default for all of them is "NO"):
WEB_NO_TRANSPARENCY - Do not use transparent background pixels
WEB_HIDE_PROGRESS - Hide the progress bar windows
WEB_ADD_SCALE_BAR - Add a scale bar to the map (Google Maps Only)
WEB_ADD_MAP_TYPE_CONTROL - Add a map type control (Google Maps Only)
WEB_ADD_OVERVIEW_MAP - Add an Overview Map (Google Maps Only)
WEB_AUTO_GRID - Create a default grid (KML Raster only)
WEB_SKIP_EMPTY_TILES - Skip tiles that have no data
WEB_USE_JAVA_FILE_NAMES - Create names for World Wind Java (World Wind only)
WEB_TRANSPARENT_TILES - Make the image tiles transparent
WEB_SKIP_EXISTING_TILES - Skip tiles that already exist (resuming export)
WEB_FILL_TO_TILE_BOUNDS - Fill the tiles to the bounds
WEB_NO_HTML_FILE - Generate tiles only, no HTML file
WEB_FORCE_PALETTE_PNG - Force the PNG to have palette instead of RGB
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
I still get the exception:
Unhandled exception processing command message 33949 with code 0.
Read access violation at data address 0xFFFFFFF1,
program address 0x7862F7A6.
Version: v15.1.9
Build Time: Apr 28 2014 08:42:29
I will see if I can isolate the data that causes it. Also this version caused my layers that were in GROUPS to be listed individually - oddly, some GROUPS were not effected, most were though. -
I ran the export on a different set of data - line features only, and it worked. The data that was failing included line features and point features. Even though an exception was raised with this data set, the point features were exported - not the line features. I couldn't isolate further because I only get 4 exports with the trial license.
-
I went back to V14 and could successfully export the same data as in V15 plus I could successfully export that same data with additional point features. I removed the point features from the failed data set, and it still fails with just the line features. Something in that set of line features is causing the exception.
-
Can you provide the data with the line features? If I can reproduce it I should be able to fix it pretty easily.
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
I isolated it to this line feature:
Idx,Longitude,Latitude,Elevation (m),Length,Total Length,Heading
1,72° 09' 35.3520" W,43° 27' 10.9080" N,297.331,128.65 ft,---,15.6°
2,72° 09' 34.8840" W,43° 27' 12.1320" N,296.586,40.096 ft,128.65 ft,0.0°
3,72° 09' 34.8840" W,43° 27' 12.5280" N,296.368,51.93 ft,168.75 ft,335.9°
4,72° 09' 35.1720" W,43° 27' 12.9960" N,296.157,189.62 ft,220.68 ft,1.6°
5,72° 09' 35.1000" W,43° 27' 14.8680" N,295.116,189.56 ft,410.29 ft,359.2°
6,72° 09' 35.1360" W,43° 27' 16.7400" N,294.094,103.45 ft,599.85 ft,342.1°
7,72° 09' 35.5680" W,43° 27' 17.7120" N,293.643,123.43 ft,703.3 ft,328.9°
8,72° 09' 36.4320" W,43° 27' 18.7560" N,293.243,158.17 ft,826.73 ft,7.7°
9,72° 09' 36.1440" W,43° 27' 20.3040" N,292.345,72.441 ft,984.9 ft,342.9°
10,72° 09' 36.4320" W,43° 27' 20.9880" N,292.034,112.7 ft,1057.3 ft,334.9°
11,72° 09' 37.0800" W,43° 27' 21.9960" N,291.63,201.94 ft,1170 ft,347.1°
12,72° 09' 37.6920" W,43° 27' 23.9400" N,290.725,292.58 ft,1372 ft,355.3°
13,72° 09' 38.0160" W,43° 27' 26.8200" N,289.268,134.47 ft,1664.6 ft,18.4°
14,72° 09' 37.4400" W,43° 27' 28.0800" N,289.427,95.365 ft,1799 ft,6.4°
15,72° 09' 37.2960" W,43° 27' 29.0160" N,290.741,231.34 ft,1894.4 ft,319.1°
16,72° 09' 39.3480" W,43° 27' 30.7440" N,293.904,108.23 ft,2125.7 ft,323.9°
17,72° 09' 40.2120" W,43° 27' 31.6080" N,295.49,152.7 ft,2234 ft,338.6°
18,72° 09' 40.9680" W,43° 27' 33.0120" N,297.896,180.38 ft,2386.7 ft,323.9°
19,72° 09' 42.4080" W,43° 27' 34.4520" N,300.686,129.39 ft,2567.1 ft,343.3°
20,72° 09' 42.9120" W,43° 27' 35.6760" N,302.818,124.39 ft,2696.4 ft,355.1°
21,72° 09' 43.0560" W,43° 27' 36.9000" N,304.81,76.96 ft,2820.8 ft,5.9°
22,72° 09' 42.9480" W,43° 27' 37.6560" N,305.95,114.11 ft,2897.8 ft,352.0°
23,72° 09' 43.1640" W,43° 27' 38.7720" N,307.816,233.66 ft,3011.9 ft,356.7°
24,72° 09' 43.3440" W,43° 27' 41.0760" N,311.554,186.07 ft,3245.6 ft,357.5°
25,72° 09' 43.4520" W,43° 27' 42.9120" N,314.526,250.5 ft,3431.6 ft,347.1°
26,72° 09' 44.2080" W,43° 27' 45.3240" N,318.846,80.586 ft,3682.1 ft,5.7°
27,72° 09' 44.1000" W,43° 27' 46.1160" N,320.043,59.813 ft,3762.7 ft,12.8°
28,72° 09' 43.9200" W,43° 27' 46.6920" N,320.84,121.72 ft,3822.5 ft,11.7°
29,72° 09' 43.5852" W,43° 27' 47.8692" N,321.735,---,3944.3 ft,--- -
I tried loading just that line and export to OSM and it worked ok. What settings (zoom level, image format, etc.) are you using when you get the error? Are you loading just that file, then exporting just that line to OSM when you get the crash?
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
When just that feature is loaded and exported to OSM XML, I still get the error. Not sure what you are asking for settings? The OSM options are the default.
options1.jpgoptions2.jpg -
Ah sorry I thought you were exporting OSM tiles, not the OSM XML format! However I still can't reproduce it. Can you save a workspace after loading the line with the text file above that generates the error on export so I can reproduce from that? My only thought is maybe I'm not loading the line correctly from the text file to get the problem.
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Global Mapper -
Yes. Attached.
-
Ah thanks, now I can reproduce. The issue was the RouteParams attribute which was in your GMW but not the sample text above. If that attribute was present with more than 12 comma-separated values there was a crash. All fixed now. I have placed a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper15.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v15.xx installation folder to give it a try. If you are using the 64-bit v15 version there is a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper15_64bit.zip .
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
Well done! Thanks.
-
Using the Help for EXPORT_WEB above, and trying to export in MBTILES format. I get the following script error:
Exporting data to C:\Master Map\Tile Maps\New Hampshire.sqlitedb...
EXPORT_WEB found no data to export. This can happen when you specify WEB_SKIP_EXISTING_TILES=YES and all of the tiles exist or when no data intersects the export bounds.
My script line looks like this: EXPORT_WEB FILENAME="C:\Master Map\Tile Maps\New Hampshire.sqlitedb" TYPE=MBTILES POLYGON_CROP_FILE="C:\Cropping Polygons\New Hampshire.shp" MAX_ZOOM_LEVEL="10" NUM_ZOOM_LEVELS="4" IMAGE_FORMAT="PNG" WEB_NO_HTML_FILE="YES"
I am running the script from within the tool itself with the Context of Main view enabled, with data loaded.
I am using v15.2.0 build time May 7 2014 -
Can you attach a zip archive containing the data and the crop polygon file here? That would allow me to debug your specific scenario to see what is causing the problem. Thanks.
Bob -
Archive provided.
-
Thank you for the data. The problem is caused by a bug in Global Mapper, which I will endeavor to fix in the next day or so. In the meantime, you can work around the problem by loading the crop polygon file as a Global Mapper layer instead of having the EXPORT_WEB script statement load it.
Cheers,
Bob -
OK. Thank You.
-
I was able to work around the error as you said with the following script command:
EXPORT_WEB FILENAME="C:\Trail Masters\Working\Exp-Imp\Tile Maps\New Hampshire.sqlitedb" TYPE=MBTILES MAX_ZOOM_LEVEL="10" NUM_ZOOM_LEVELS="4" IMAGE_FORMAT="PNG" WEB_NO_HTML_FILE="YES"
However the resulting file is not displaying in my mobile app. I have tried to read the file back into Global Mapper - selecting the Overlay Type = Spatialite Spatial Database but GM gives the following error: "No tables found in connection...."
What is the best way to debug the resulting sqlitedb file other than importing to the mobile app to see it doesn't diaplay. The export to Web format command from within the tool is working OK. -
I tested the output from your script using a Windows-based MBTiles viewer that can be downloaded from this link. I have also done some testing using an Android emulator called BlueStacks and an Android mapping application. What application are you testing with? What sort of error message are you getting? It is not easy to test these maps because none of the applications is really a MBTiles debugger.
Global Mapper can not import MBTiles files at this time. There is an item on our task list to implement that, but we haven't gotten to it yet.
Good Luck,
Bob -
Thanks for the links, I'll give them a try. I'm not getting any errors - the maps just don't display, so I suspect there is some setting that's not right.
-
It looks like the export command from within the GM tool for web format = RMaps SQLite Database is not the same as the TYPE=MBTILES I am specifying in my script. Is there a TYPE setting for generating sqlitedb format from the scripting language? I also need to be able to specify the tile size of 256 x 256. I am attempting to export to a format compatible with mobile devices such as OsmAnd and Locus.
-
The EXPORT_WEB command supports both TYPE=RMAPS and TYPE=MBTILES, so you can export whichever you need. The tile size should come out as 256x256 automatically.
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
Thank you for the data. The problem is caused by a bug in Global Mapper, which I will endeavor to fix in the next day or so. In the meantime, you can work around the problem by loading the crop polygon file as a Global Mapper layer instead of having the EXPORT_WEB script statement load it.
Wondering if this was e
Cheers,
BobThank you for the data. The problem is caused by a bug in Global Mapper, which I will endeavor to fix in the next day or so. In the meantime, you can work around the problem by loading the crop polygon file as a Global Mapper layer instead of having the EXPORT_WEB script statement load it.
I am revisiting this and notice the POLYGON_CROP_FILE is not working for a script running in the context of the GM program. Both points and lines outside the cropping polygon are included in the output.
Cheers,
Bob
EXPORT_WEB FILENAME="C:\Trail Masters\Build\SQliteDB Files\ATV Maine-10-3.sqlitedb" TYPE=RMAPS POLYGON_CROP_FILE="C:\Trail Masters\Map Borders\Cropping Polygons\Maine.shp" MAX_ZOOM_LEVEL="10" NUM_ZOOM_LEVELS="3" IMAGE_FORMAT="PNG" WEB_TRANSPARENT_TILES="YES" WEB_SKIP_EMPTY_TILES="YES"
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website