[gdal-dev] NTF/JPEG2000 Question

Even Rouault even.rouault at mines-paris.org
Mon Jul 18 04:06:20 EDT 2011


Selon Ivan Lucena <ivan.lucena at pmldnet.com>:

> Frank,
>
> I am having a similar problem with a files like that. They are taking more
> than 3 seconds just to open on gdalinfo or any GDALOpen() call. That wouldn't
> be a problem except in a case where we are running a large bath process with
> several gdal_translate runs frequently.

IMHO, the opening time has nothing to do with the presence of GCPs. I would
suspect that your NITF file is JPEG2000 compressed and that there's a slowdown
due to the underlying JPEG2000 driver that is used. You could try to switch to
another JPEG2000 driver to see if things improve.

>
> But as far I can tell the GCP are right on the corner pixels, so it would be
> very fast to interpret it as a GeoTransform matrix. Would that be safe to
> change the driver's code to do that?

The code is already supposed to try to transform the GCPs in a GeoTransform. If
the interpolation is exact, the GeoTransform will be returned, otherwise the
GCPs. You might want to track what happens in the GDALGCPsToGeoTransform()
function called at line 1040 of nitfdataset.cpp

>
> Regards,
>
> Ivan
>
>
> >  -------Original Message-------
> >  From: Frank Warmerdam <warmerdam at pobox.com>
> >  To: Logan Greenlee <lgreenlee at digitalresultsgroup.com>
> >  Cc: gdal-dev at lists.osgeo.org <gdal-dev at lists.osgeo.org>
> >  Subject: Re: [gdal-dev] NTF/JPEG2000 Question
> >  Sent: Jul 17 '11 10:32
> >
> >  On Sun, Jul 17, 2011 at 8:16 AM, Logan Greenlee
> >  <lgreenlee at digitalresultsgroup.com> wrote:
> >  > Sorry - here are the GCP's:
> >  ...
> >  > Is there any particular reason mapserver can't use the GCP's for
> display? Is it that they are not necessarily corner points of the image?
> >
> >  Logan,
> >
> >  It is just not a feature of MapServer to support warping
> >  (rubber sheeting) of images on the fly based on GCPs.  It
> >  would be fairly computationally expensive to do this so I
> >  deemed it not very useful in MapServer.  It also isn't something
> >  I've seen requested often.
> >
> >  However, MapServer does support reprojecting images on
> >  the fly which is similarly computationally expensive, so it
> >  might make sense to add a mechanism to MapServer to use
> >  gdal transformers (such as polynomial warping using GCPs)
> >  as an option. It would require some development.
> >
> >  Best regards,
> >  --
> >
> ---------------------------------------+--------------------------------------
> >  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
> >  _______________________________________________
> >  gdal-dev mailing list
> >  gdal-dev at lists.osgeo.org
> >  http://lists.osgeo.org/mailman/listinfo/gdal-dev
> >
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>




More information about the gdal-dev mailing list