[gdal-dev] RV: question how to get spot and landsat share a common grid.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[gdal-dev] RV: question how to get spot and landsat share a common grid.

Fuchs Juan Carlos

Let us introduce ourselves, we are a GIS team of the Cartographic division of INDEC (the national census buro of Argentina), we are working on the next national Agricultural Census 2018, which will be carried out on Tablets with Android O.S., running Leaflet to show the maps.

 

We have strong storage restrictions (SD 16 GB memory) and the hole program (images included) has to run local on the tablet (no internet signal in the most areas to be covered)

 

We get an province wide 30mts. LANDSAT mosaic, resampled at 15mts with the monocromatic band (each pair: census tacker/tablet) are restricted to only one province.

 

But for some zones (intensive agricultural use) we need SPOT 2,5 mts images.

 

We get to generate the tiled pyramid of the 15mts landsat, using GDAL gdal2tile

gdal2tiles.py -t "BS AS" -c INDEC -z 0-8 -e -d -a 0 -p raster -v -s EPSG:22185 -r cubic /BsAsGK5.tif /tiles_bs_as

 

After that we convert the png files to jpg, using :

find tiles_bsas -iname '.png' | while read i; do mogrify -format jpg "$i" && rm "$i"; echo "Converted $i to ${i%.}.jpg"; done

 

Here is our question: How should we generate the tiled pyramids of the 2,5 mts SPOT images in a way that both images use the same grid without 'resampling' the whole landsat to 2,5mts, of course, hoping to make one web tile tree that goes down to 2.5 meters in some places, but only down to 15meters in other places. (as Frank Warmerdam clearly put out)

 

If you are willing to give us some advice, we will send you the link`s to some sample images.

 

Link to LANDSAT 15mts. example (prov of BsAs) 6.5GB

Link to SPOT 2,5mts. example (Department of San Pedro) 2.3Gb

 

Thank`s in advance

JC

 

---------------------------------------------------------------------

Arqto. - Mgster.  Juan Carlos Fuchs
Sistema de Información Geográfica

Instructor y Soporte de Firma Digital
Instituto Nacional de Estadística y Censos - INDEC
Av. Julio A. Roca 609, 8° piso, of. 807/808 - CABA (1067)
Tel.: 54 11 4349-9704 - 4349-9702/03/05/06/08/00

 


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RV: question how to get spot and landsat share a common grid.

Even Rouault-2

Juan Carlos,

 

>

> Here is our question: How should we generate the tiled pyramids of the 2,5

> mts SPOT images in a way that both images use the same grid without

> 'resampling' the whole landsat to 2,5mts, of course, hoping to make one web

> tile tree that goes down to 2.5 meters in some places, but only down to

> 15meters in other places. (as Frank Warmerdam clearly put out)

 

I don't think this is possible with a unmodified gdal2tiles (but I'm not a specialist of gdal2tiles, so I'd be happy to be corrected), at least not by having the 2.5 and 15m resolutions. The issue is that 15 / 2.5 = 6 which is not a power of 2, and as far as I know, gdal2tiles only knows to generate zoom levels that differ by power of twos.

A workaround would be to use a global tiling system like Google Maps, run gdal2tiles on your landsat and spot separately (which will cause resampling them to the closest pre-defined zoom level to their native resolution), and then copy the file tree structure of spot on top of landsat.

 

An enhanced gdal2tiles could possibly handle your case by generating a custom WMTS tiling scheme where you would define the zoom levels, but this has yet to be written.

 

Even

 

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RV: question how to get spot and landsat share a common grid.

Petr Pridal - Klokan Technologies GmbH
Juan,

> An enhanced gdal2tiles could possibly handle your case by generating a custom WMTS tiling scheme where you would define the zoom levels, but this has yet to be written.

MapTiler Pro is the enhanced GDAL2Tiles which is being actively developed for years now - and it is able to do this (next to many other things - such as boost in rendering speed, significantly smaller size of the produced tiles, reprojection on the way, cutline clipping, palette expansion, MBTiles output, WMTS compatibilty, support for native mobile apps, very fast tile upload to S3/GCS, cluster processing mode, etc.).

If you want the .deb or .rpm instalers of MapTiler for your linux distro, or the Windows or Mac binary, just fill the form at http://www.maptiler.com/demo/.

You can also use the MapTiler Pro on a command line directly with this docker command:
$ docker run -ti --rm -v $(pwd):/data klokantech/maptiler maptiler -help

See https://www.docker.com/ and  https://hub.docker.com/r/klokantech/maptiler/ for more details. Files in local directory can be processed easily on any computer where docker is installed - without a need to resolve GDAL installation dependencies and proprietary drivers.

If you are limited by the size - I recommend to try rendering into WebP as an alternative to JPEG. WebP can be made with option "-f webp" and it will have half the size of JPEG tiles probably. Android tables should be able to display these fine.

There is a manual describing the functionality of the MapTiler software: http://manual.maptiler.com/.

If you render the Mercator tiles (and resample your rasters to more detailed resolution - probably native zoom +1), then everything is done with a single command on CLI.

If you really want to preserve the pixel perfect native resolution and fiddle with dirrent grids and resolutions on different zoom levels, then you may be interested in the advanced options at:

If you need help - just drop me an email. We can also render for you the sample data if you upload them to https://www.klokantech.com/upload/ and let me know.

Best regards,

Petr

P.S.
Recently we have also made a free mobile app for Android and iOS tables - which displays GPS position on top of maps and can help to collect the field data into GeoJSON - even offline. See: http://blog.klokantech.com/2017/05/geoeditor-mobile-app-for-maptiler.html and https://www.youtube.com/watch?v=OuoKvq03nNA

Disclaimer: I am the original author of GDAL2Tiles, and also the leader of the team behind MapTiler Pro product, which is not open-source - but it is fully powered by open-source components. We contribute back to GDAL (such as with PDFium driver) and FOSS4G community (with EPSG.io, TileServer GL, OpenMapTiles, WebGL Earth, and many other open-source projects and patches).
--
Petr Pridal, Ph.D.
CEO

Klokan Technologies GmbH
Hofnerstrasse 98, 6314 Unterageri, Switzerland
Tel: <a href="tel:041%20511%2026%2012" value="+41415112612" target="_blank">+41 (0)41 511 26 12
Email: [hidden email]
Web: http://www.klokantech.com/

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Loading...