[gdal-dev] Setting the georeferencing priority for GDAL
Frank Warmerdam
warmerdam at pobox.com
Sun Oct 27 09:32:59 PDT 2013
Jukka,
Part of why behavior is inconsistent now is that the logic is in each
driver. Some might give precidence to a world file over something
internal, or to .aux.xml.
I think it would be *desirable* for .aux.xml to take precedence over
internal information
when it is available as it is normally only in the .aux.xml file because
it was updated or accurate information could not be written within the file
itself.
I'm not sure how we would go about updating all drivers to have consistent
behavior. I do like the idea that drivers can control this. I just think
it would be good to have a suggested behavior we aim for.
I'm not too keen on a configuration option as those are always a sort of
hack, though it is possible.
I will note you can always "gdal_translate" to VRT and then hand edit or
alter it with gdal_edit.py to get a wrapped dataset with the desired
georeferencing and other metadata.
Best regards,
Frank
On Sun, Oct 27, 2013 at 4:02 PM, Jukka Rahkonen
<jukka.rahkonen at mmmtike.fi>wrote:
> Hi,
>
> Sometimes an image can have several and ambiguous metadata for
> georeferencing. Mapserver has a method to deal with ambiguous internal
> geotiff metadata and world files and user can override the internal
> metadata
> by using PROCESSING "EXTENT_PRIORITY=WORLD" in the mapfile.
> http://www.mapserver.org/input/raster.html#special-processing-directives.
> I thought it was PROCESSING "EXTENT_PRIORITY=WORLDFILE" but perhaps both
> keywords are supported.
>
> I wonder if GDAL supports this same worldfile override with some secret
> config option. At least it is not listed on page
> http://trac.osgeo.org/gdal/wiki/ConfigOptions.
>
> I can also see that GDAL does have a config option GMLJP2OVERRIDE but I
> could not easily find what is is doing.
>
> And finally when I was playing with a "gdal_edit.py" utility I discovered
> that there are at least 4 ways to georeference a JPEG2000 file:
> - use worldfile .wld or .j2w
> - use internal GeoJP2 (GeoTIFF) georeferencing
> - use internal GML georeferencing
> - use an external .aux.xlm file
>
> I noticed that command
> python gdal_edit.py -a_srs epsg:3067 metajp2test.jp2
> was creating a file names "metajp2test.jp2.aux" which does contain the
> right
> georeferencing data. However, if I run gdalinfo it is looking for the
> internal GeoJP2 metadata and it reports that my JPEG2000 file is still
> using
> an unknown projection.
>
> This feels a bit messy. Perhaps there is a need to have a GDAL wide config
> option for what metadata to search and use for georeferencing. In my case I
> would like to set it to use "external GDAL aux.xml". In addition, I think
> that this setting should be made safe so that if aux.xml file is not found
> then the image is considered to be without georeferencing. Or perhaps the
> config option could take a list like "auxiliary_xml,GeoJP2" with all the
> acceptable alternatives in priority order.
>
> -Jukka Rahkonen-
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Software Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20131027/f3b7e46b/attachment.html>
More information about the gdal-dev
mailing list