Geopdf files in OruxMaps

For all high tech electronic equipment including GPS, PLB, chargers, phones, computers, software. Discussion of simple electrical devices such as torches, belongs in the main 'Equipment' forum.

Geopdf files in OruxMaps

Postby Off-track » Wed 19 Jul, 2017 12:50 pm

OK, I have started a new thread because keithy and wildwanderer are contributing so much useful information on this topic and I am sure interest will continue way beyond the original topic of the other thread at http://bushwalk.com/forum/viewtopic.php?f=21&t=25950.

To summarise:

You need the latest oruxmaps version 7.017 for geopdf to work.

NSW etopo maps can be downloaded from http://maps.six.nsw.gov.au/etopo.html but currently give blinking problems for some users (including me). They look identical in style and resolution to the downloaded wms rasters from six.

QLD geopdf maps can be downloaded from http://qtopo.dnrm.qld.gov.au/mobile/ (then follow: Click here to ... > Download a standard map sheet > 1:25,000 > Next > Search By (choose either Name or Number) > Next > enter your map Name or Number > Download Map). They work without blinking for me. They are higher in resolution than the downloaded wms rasters from qtopo.

An advantage over wms is that when geopdf files work well they fill the whole screen at any zoom level.

A disadvantage for geopdf maps that are standard mapsheets is that they include margin information of variable width, and they are georeferenced across the whole image including the map border. Therefore, when you come to the edge of the map you will see margin info rather than the adjacent map unless you manually select the adjacent map in OM. There may be workarounds or alternatives such as cropping and saving with geopdf references, or downloading the map areas without sheet margins - but I have not worked them out.

keithy has explained some file conversion options as workarounds for problem files, and I believe that Orux is continuing to tweak geopdf capability.

I am not sure how total size will compare with wms downloads at the same resolution, but this may not be a problem if you have a suitably large SD card.

I can see that there might be a lot of geopdf sheets with not very useful names, so avid users might find it useful to have a separate subdirectory for them in OM (under mapfiles), and to rename for easy recognition (like TyalgumQLD_9541-31.pdf instead of QTopo_9541-31.pdf).

Perhaps other forum users will post download links or usage tips.
Off-track
Nothofagus gunnii
Nothofagus gunnii
 
Posts: 36
Joined: Sat 01 Jul, 2017 8:20 pm
Region: New South Wales
Gender: Male

Re: Geopdf files in OruxMaps

Postby michael_p » Wed 19 Jul, 2017 1:46 pm

You might want to have a read through this thread about NSW Etopo maps: viewtopic.php?f=36&t=25020 . The post by mholling has info on how to trim geopdf images using gdalwarp.

Cheers,
Michael.
One foot in front of the other.
User avatar
michael_p
Athrotaxis selaginoides
Athrotaxis selaginoides
 
Posts: 1112
Joined: Sun 15 Nov, 2009 6:58 pm
Location: Macarthur Region of Sydney.
Region: New South Wales
Gender: Male

Re: Geopdf files in OruxMaps

Postby wildwanderer » Wed 19 Jul, 2017 3:22 pm

In regard to the GEO PDF flashing/blinking issue with NSW topos. I suspect this may be device related perhaps to do with available memory or processor speed.

I have no flashing/blinking issues using a late model android phone.

I did try the Pottesville topo that was causing you issues off-track and it loaded fine for me and also transitioned to the neighbouring BURRINGBAR topo with no issues.
User avatar
wildwanderer
Athrotaxis selaginoides
Athrotaxis selaginoides
 
Posts: 1056
Joined: Tue 02 May, 2017 8:42 am
Region: New South Wales
Gender: Male

Re: Geopdf files in OruxMaps

Postby Off-track » Thu 20 Jul, 2017 10:41 am

Thanks for looking wildwanderer. I don't think it is memory as my phone has 2.37 GB free user ROM and more than 20 GB free on a class 10 SD card formatted as emulated internal memory. It may be processing power as my (cheap) ZTE A462 has a mere 1.1GHz quad core Qualcomm Snapdragon CPU with 1GB RAM + 8GB ROM.

I notice that the QLD maps (which display without problems for me) are pure raster and were produced in ArcMap, whereas the NSW maps (which give blink problems for me) have some vector layers and were produced in ArcCatalog. The NSW maps also confuse Nitro PDF viewer, which I used to see these things.

I think the transition problem with standard mapsheets will be most obvious going from West to East, so that you run into the wide margin of the mapsheet to the right of the map area. Certainly I run into the margins and have to manually select the adjoining mapsheet to see map there, even with the QLD georeferenced pdf maps that don't blink off for me.

Thanks michael_p. The post you mentioned also says that the margins around mapsheets will be a problem. I guess that is unless OM is smart enough to use neatline data embedded in the georeferenced pdf files - which it does not seem to do for me at least?? Did you get the extraction of the map area to a georeferenced pdf working with gdalwarp? If so, would you be willing to post the method?

The post you mentioned says there may be a way, but it leads eventually to a dead link in nabble. I can see that there might be a method, but I was scared off by talk of experimental pythonscripts etc. So if someone has it working and is willing to share the method (stepwise for dummies like me) that would be great.
Off-track
Nothofagus gunnii
Nothofagus gunnii
 
Posts: 36
Joined: Sat 01 Jul, 2017 8:20 pm
Region: New South Wales
Gender: Male

Re: Geopdf files in OruxMaps

Postby michael_p » Fri 21 Jul, 2017 5:26 pm

Off-track wrote:Did you get the extraction of the map area to a georeferenced pdf working with gdalwarp? If so, would you be willing to post the method?

No I haven't yet. Been occupied by other projects and this thing called life keeps getting in the way.

Cheers,
Michael.
One foot in front of the other.
User avatar
michael_p
Athrotaxis selaginoides
Athrotaxis selaginoides
 
Posts: 1112
Joined: Sun 15 Nov, 2009 6:58 pm
Location: Macarthur Region of Sydney.
Region: New South Wales
Gender: Male

Re: Geopdf files in OruxMaps

Postby Off-track » Fri 21 Jul, 2017 9:25 pm

I know the feeling michael_p.

From what I can see, some geospatial pdfs have a neatline entry (e.g. Qtopo Lamington) whereas other do not (e.g. Qtopo Tyalgum) and others have a neatline spec that is either inaccurate or in a different projection to the associated map (e.g. http://lists.osgeo.org/pipermail/gdal-dev/2013-January/035269.html, https://2016.foss4g-na.org/sites/default/files/slides/using-gdal-to-translate-us-topo-geopdf.pdf), https://gis.stackexchange.com/questions/63105/gdalwarp-not-clipping-neatline-properly).

In that case, it seems to me that: (i) if OM switches between such maps without being confused by the map margins it uses some very neat programming and (ii) it is a pain in the **** for mortals like me to arrange cropping of such sheets to the map area in either gdal (command prompt) or qgis (GUI).

Also, wildwanderer may be right about memory and processing power as the NSW geospatial pfdfs hang my Win7 netbook when I try to open all the vector layers in qgis. The QLD (raster) geospatial pfdfs open just fine (albeit slowly). So complex vector geospatial pdfs under Android may only be for those with big processors (and/or lots of ROM).

For now I am content with the wms maps for NSW. While I would love to have a seamless mosaic of QLD geospatial pdfs (for their higher resolution and full-screen viewing) it is too hard to implement. But someone else may have a solution.
Last edited by Off-track on Wed 26 Jul, 2017 12:33 pm, edited 1 time in total.
Off-track
Nothofagus gunnii
Nothofagus gunnii
 
Posts: 36
Joined: Sat 01 Jul, 2017 8:20 pm
Region: New South Wales
Gender: Male

Re: Geopdf files in OruxMaps

Postby Off-track » Wed 26 Jul, 2017 12:32 pm

I take it all back; QLD (QTopo raster) Tyalgum pdf does have a neatline. For some reason it is not revealed by qgis map properties, but is revealed by gdalinfo. And at high zoom, NSW (e-Topo vector) pdfs are higher resolution than the NSW wms maps downloaded at zoom 16. Of course, you could download NSW wms at higher zoom (up to 21). Qtopo currently offers wms to a maximum of zoom 15, wheres the QTopo geo-referenced pdfs are higher resolution (they look to be at least equivalent to zoom 16). Each zoom step has about x4 resolution (and file size). You will have to decide whether the performance hit (memory use for either raster or vector, and loading time especially for vector) justifies the resolution gain.

Also, in support of the experience reported by wildwanderer and keithy, Orux advises that in OM "Although you see the borders, the app uses the neatline as the boundary of the map, so it must load another new map by passing those limits. But I have find a lot of maps with a neatline outside the map limits."

QLD (QTopo raster) pdfs have the neatline right on the map boundary, whereas NSW (e-Topo vector) pdfs have the neatline out further, including the grid coordinates in the map margin. In either case, there is little to be gained by cropping the mapsheets. Geo-referenced pds will transition in OM as the neatline crosses the screen centre point. There is no way in OM to set up a true mosaic at the intersection of pdf mapsheets. Only one pdf map can be displayed at any one time.

In contrast, a wms topo map is a true mosaic. Although the NSW wms map (but not the QLD wms map) displays gridlines, you can not go to the margin to see grid coordinates. At some zoom levels (probably less than you use for hiking, but maybe in the range you use for driving) the wms map display will be smaller than the phone screen. If this is important you might want to experiment with wms tile size in OM from v 7.0.18.

Given plenty of sd card capacity, you can load both pdf and wms (and OpenAndro) offline map types, and choose what to view in OM (using Switch map or Switch map here) at any particular time and place. There is a time penalty when loading OM (and generating maps database) if it needs to check lots of offline pdf maps.

Geo-referenced pdf display is much more capable in OM v 7.0.18 beta3 (and no doubt in subsequent stable releases). For example, NSW (e-Topo vector) pdfs now display without blinking on my phone (ZTE A462), although loading is much slower than the zoom 16 wms map. Currently a geometry error affects display and transition of QLD (QTopo) pdfs, but hopefully that will soon be fixed. For more information, see the OM forum http://www.oruxmaps.com/foro/viewtopic.php?f=8&t=4504
Off-track
Nothofagus gunnii
Nothofagus gunnii
 
Posts: 36
Joined: Sat 01 Jul, 2017 8:20 pm
Region: New South Wales
Gender: Male

Re: Geopdf files in OruxMaps

Postby Off-track » Sat 05 Aug, 2017 3:01 pm

In case of maps (like QTopo wms) that lack a UTM grid, you can load one as a kml overlay in OM. Probably the easiest way is to obtain the UTM grid for your zone of interest as a shapefile from http://earth-info.nga.mil/GandG/coordsys/grids/utm_1km_polyline_dloads.html, then convert a selected region within it to KML using GDAL. For example, starting with the shp file for the 56SJ zone: ogr2ogr -f kml -clipsrc 152.9 -28.5 153.4 -28.0 UTM.kml UTM_1km_56S_J.shp.

Load the resulting KML into your OM overlay folder, and you can display it using Map {icon} > Overlay options > Load KML Overlay > select the overlay of interest (blue square with tick) > OK.

You should specify an appropriate region (using option -clipsrc and the coordinate system of the source data, EPSG:6326 = WGS84 {USA} projected in LL degrees in this case) or you will generate a very large kml file for an entire UTM zone, which will hang most programs including OM. I tried a region of 5 x 5 degrees which gave a kml file of 695 KB and was workable though a bit slow to load in OM. It aligns perfectly with the UTM grid built into SIX (NSW) wms. You can get appropriate coordinates for your area of interest using GE.

Those so inclined can change properties of displayed lines by editing the kml file. This is easiest to accomplish in GE, at the cost of some increase in file size (right-click the layer in the Places sidebar for > Properties and > Save Place As). It can also be done in a text editor. The most obvious effects would be to change line colour, thickness or transparency; e.g. from from red (ff0000ff) to green (7f00ff00) in <LineStyle>.
Screenshot_20170805-144730.png

You could also set up such a grid for a smaller area by (i) specifying a smaller region in the command line above, (ii) using a program like QGIS, or (iii) copying from the worldwide UTM grid (Gridlines_utm.kml) from http://www.nearby.org.uk shown in appropriately zoomed GE, and saved to My places, then saving the displayed 10 km and 1 km gridline information (and optionally the labels) as kml or kmz files.
Off-track
Nothofagus gunnii
Nothofagus gunnii
 
Posts: 36
Joined: Sat 01 Jul, 2017 8:20 pm
Region: New South Wales
Gender: Male


Return to Techno-Babble

Who is online

Users browsing this forum: No registered users and 3 guests