[gdal-dev] How to use RPC Metadata from NITF Files in a MapServer TileIndex

Even Rouault even.rouault at mines-paris.org
Sun Jun 17 09:38:05 PDT 2012


Le dimanche 17 juin 2012 18:24:29, Smith, Michael ERDC-RDE-CRREL-NH a écrit :
> I have a large number of NITF JP2K files. These files have IGEOLO metadata
> to the second accuracy so reprojecting these images leads to poor results.
> The images also have rpc metadata and using the -rpc option in gdalwarp
> reprojects them quite well. These files are source epsg:4326 and need to
> be reprojected to epsg:3857 for display.
> 
> I had orginally thought to just create a vrt for each ntf file with the rpc
> information but a tileindex of the vrts is dramatically slower to display
> in MapServer (for a 1:8000 scale area, from ~ 1 sec to over 10 min). It
> does reproject correctly though. Obviously not practical.
> 
> I then thought to reproject the vrts to an actual format (geotiff). The
> problem is that the black bounds (which should be nodata but are just near
> black areas) get expanded and aren't handled even when using the nearblack
> utility on the resulting geotiffs.
> 
> The best option (if possible) would seem to use the source nitf files but
> force gdal to use the rpc information to reproject (without having to go
> through the vrt process). Perhaps a CPL config option that could be set
> inside mapserver?

Did you use the -dstalpha option of gdalwarp, so that the areas in the 
reprojected image that are not part of the source image are marked with a 0 
alpha value ? -dstnodata could also do it.

> 
> Other suggestions are welcome.
> 
> Mike
> 
> --
> Michael Smith
> michael.smith at usace.army.mil
> US Army Corps
> Remote Sensing GIS/Center


More information about the gdal-dev mailing list