WorldWindAndroid icon indicating copy to clipboard operation
WorldWindAndroid copied to clipboard

Supported CRS and projections

Open pdavidc opened this issue 8 years ago • 27 comments

Support the following Coordinate Reference Systems and projections when displaying data from external sources, such as WMS:

Coordinate Reference Systems CRS:84 WGS84 geographic longitude, then latitude, expressed in decimal degrees EPSG:4326 WGS84 geographic latitude, then longitude, expressed in decimal degrees

Projections EPSG:3395 World Mercator projection EPSG:3857 Web Mercator UTM projections over WGS84 (north zones)… EPSG:32601 to EPSG:32660 UTM projections over WGS84 (south zones)… EPSG:32701 to EPSG:32760 UPS projection over WGS84 (north zone)…… EPSG:32661 UPS projection over WGS84 (south zone)…… EPSG:32761

pdavidc avatar Aug 30 '16 22:08 pdavidc

Just wanted to add a big +1 on this.

This would also allow to integrate offline maps like mbtiles and mapsforge maps (that cover with small size complete nations). And of course all OSM TMS sources.

moovida avatar Feb 23 '17 07:02 moovida

Hey guys, can i know when the mercator projection will be in release?

ghost avatar Dec 07 '17 07:12 ghost

@pdavidc , would it be possible to have an idea on what would need to be ported to NWWAndroid from the java version to make the 3857 Web Mercator work? That one is supported in the java version and I suppose it would mean to port some classes to the android environment. If that is so, would it be possible to name them. I gave a look some time ago, but am not sure if the 2-3 I saw could be enough.

moovida avatar Dec 07 '17 08:12 moovida

Hi @moovida, our team reviewed our roadmap yesterday, and this is on the list. The Web Mercator capabilities developed for WWJava are not something we plan to port. Though if you were inclined to do so in your own codebase, see MercatorTiledImageLayer.

Our intention is to support things like WMTS sources, TMS sources, or mbtiles sources defined in Mercator or Web Mercator, without the application having to do anything other than connect to the source as you normally would. If you have any other use cases in mind, please outline them here and we'll be sure to review them.

pdavidc avatar Dec 07 '17 17:12 pdavidc

Hi @pdavidc , thanks for the clarification. I actually only need TMS / mbtiles support and was assuming that there would need to be support for the Web Mercator projection.

So it seems everything I need is on your roadmap, which makes me a happy man :-) I am still curious about how you will handle this tile scheme without said projection.

Is it possible to have a timeframe when this is scheduled? I am eager to try to port the geopaparazzi app to NWW Android and will need to schedule some time for that.

Thanks for this!

moovida avatar Dec 08 '17 07:12 moovida

Hi @moovida, this issue is a priority on our roadmap, but we are still finalizing the schedule. We expect to make the roadmap public in the next few weeks!

eirizarry avatar Dec 08 '17 18:12 eirizarry

It's awesome to read such a good news. :)

2inqui avatar Dec 09 '17 03:12 2inqui

Hi @eirizarry , sorry to bother, any news about a possible timeline on this?

moovida avatar Mar 13 '18 13:03 moovida

@moovida howdy! Thank you for your continued interest on this issue. It is still our intent to provide this support to the community, but as have no timeline as of yet for this specific issue. We are currently working on feature specifications, and will keep certainly keep you and the broader community informed when we release more information!

eirizarry avatar Mar 15 '18 00:03 eirizarry

Hi @eirizarry , thanks for the reply! Thanks a ton. This is definitely a showstopper for our community and if there is somthing we can do to help, please let us know. Maybe we can contribute somehow.

moovida avatar Mar 15 '18 07:03 moovida

In the mean time, consider running NASA's WWSK (GeoServer) as the map tile server. This networked tile server can perform all the necessary transformations to go from your tile base to the WWAndroid WMS/WMTS queries.

jgiovino avatar Mar 20 '18 11:03 jgiovino

Thanks @jgiovino , sadly my usecase needs to provide offline mapping, so I need to be able to provide the tiles internally from files like mapsforge vector maps or mbtiles.

moovida avatar Mar 20 '18 11:03 moovida

One last thought would be to use gdal utilities to convert from your base maps to a GeoPackage pyramid which WWAndroid supports. I also believe that WWSK may possibly export this format.

jgiovino avatar Mar 20 '18 12:03 jgiovino

No reason you can't install WWSK 'whiskey' on any device and serve the data offline.

PJHogan avatar Mar 20 '18 17:03 PJHogan

@jgiovino I am generating the tiles in the field directly on the device. @PJHogan I would love to see someone install that on an android device :-)

Geopaparazzi/gvSIG Mobile are digital field mapping apps. (As many other fields apps) it needs to be offline and able to access generated and complex datasets. Any tool related chose to generate tiles in web mercator and it is many years so. So I will patiently wait as long as I can for an update on this issue :-)

moovida avatar Mar 20 '18 18:03 moovida

GeoServer can serve data ^to^ the Android client, but cannot ^run on^ the Android operating system.

PJHogan avatar Mar 20 '18 20:03 PJHogan

That was clear to me. So if you were not talking about android with "any device", I probably am not getting how I can do offline mapping on android while having to connect to a wwsk server. But that is probably starting to be offtopic for this issue.

moovida avatar Mar 20 '18 22:03 moovida

Just want to emphasize an earlier point. If you run WWSK offline, load your web Mercator (or other) mapset via standard GeoServer data stores/layers, then: You can export a GeoPackage for WW Android consumption on the disconnected device.

This may be worth investigating and may act as a stop gap.

I think the confusion is that your 'mobile' device is not networked, yes?

Summing up: if WW Android cant read your local maps then convert your local maps into something it can read. Both gdal and WWSK are potential approaches.

jgiovino avatar Mar 21 '18 12:03 jgiovino

Thanks for making this clear @jgiovino I see your point. And yes, the device has no network. The reason this could work but is not enough for me, is because this can cover only small portions. For example you won't be able to create tilesets ad a reasonable zoomlevel for a whole country (well, not even for a whole region), since apart of taking ages it will generate terabile geopackages. In this case, not knowing where the user will go to, but wanting to cover the whole area, you will need to generate tiles on the fly. And right now the only tools I know working really well on mobile device are mapsforge and rasterlite2. And their APIs for android only support Web-Mercator.

I just want to make clear that with my comments I am not arguing or pretending things to be done. I hope this is not what is coming over. I am just describing my usecase since we are discussing and (almost) silently hoping for this issue to be solved :-) .

moovida avatar Mar 21 '18 12:03 moovida

Does "terabile" == TeraByte + terrible GeoPackages?

I also (only now) realize you are probably only interested in vector data that is rasterized on the fly. Since, that is the only way to service large regions offline. good luck

jgiovino avatar Mar 21 '18 13:03 jgiovino

:-) no, terabile was a lapsus/typo. I apologize if this is too OT, but just to answer: with rasterlite2 (can be compiled with spatialite and used on android) you can serve 1 giga of technical maps (and that is a large region) or aerial maps as if they were tiff generating tiles on the fly. It works offline for large regions.

moovida avatar Mar 21 '18 14:03 moovida

Hi, I was wondering if there has been any new progress with regards to supporting EPSG:3857 Web Mercator projection? Thanks

pangers avatar Aug 02 '18 02:08 pangers

@moovida hi mate, did you successfully load mbtiles?

CodeK1988 avatar Nov 24 '23 06:11 CodeK1988

@CodeK1988 , nope, I had to choose a different piece of tech, since this was not going to be solved. Also, the project seems to be in end of life, given the last commits.

moovida avatar Nov 24 '23 06:11 moovida

@CodeK1988 , nope, I had to choose a different piece of tech, since this was not going to be solved. Also, the project seems to be in end of life, given the last commits.

I'm also stuck here. How did you load the mbtiles file in the end? Can you tell me? Thanks Reply.

CodeK1988 avatar Nov 24 '23 06:11 CodeK1988

I tried using QGIS to convert mbtiles format to gpkg, but WorldWindKotlin also get error.

CodeK1988 avatar Nov 24 '23 06:11 CodeK1988

@CodeK1988 it depends if you need 3D visualization. mbtiles is anyways about images (so no 3D). In geopaparazzi and smash (https://www.geopaparazzi.org) we use mapsforge for java android (which also has 2.5D for vector tiles and flutter_map for flutter based android/ios.

If you need more info, contact me in private, makes no sense to pollute this projects issue list.

moovida avatar Nov 24 '23 06:11 moovida