[gdal-dev] GetGCPs returns null

Even Rouault even.rouault at spatialys.com
Mon Nov 16 09:18:53 PST 2015


Le lundi 16 novembre 2015 16:24:40, Bar Ori a écrit :
> I am using ICORDS="D", but I also tried ICORDS ="G". Didn't work.

If the corner coordinates are almost a rectangle (I know you mention they are 
not, but in the case they would be close to one, but not strictly one), it is 
possible that an approximate GeoTransform is computed from them.
Otherwise you'll have to debug in the driver to figure what happens. First step 
would be to display debug messages with CPL_DEBUG=ON

> 
> -----Original Message-----
> From: Even Rouault [mailto:even.rouault at spatialys.com]
> Sent: 16 November 2015 17:01
> To: gdal-dev at lists.osgeo.org
> Cc: Bar Ori
> Subject: Re: [gdal-dev] GetGCPs returns null
> 
> Le lundi 16 novembre 2015 15:51:10, Bar Ori a écrit :
> > Hi all,
> > I wanted some explanations please about how to work with the GCPs.
> > I have an image and I want to save its corners coordinates (not a
> > rectangle) as GCPs and not using the SetGeoTransform method which
> > takes the upper-left coordinate and creates a rectangle based on it. I
> > accomplished it using the SetGCPs method. I even see that the IGEOLO
> > field (I am working with NITF) is set correctly with those
> > coordinates. The problem is that I want to retrieve those coordinates
> > for painting a footprint on a map I have. I Tried the GetGCPs method
> > but I got null. Also the GetGCPCount returns 0. (I can get the data
> > from the IGEOLO, but I prefer another solution, and in general to
> > understand why GetGCPs returns
> > nothing...)
> 
> Could be related to a wrong value of the ICORDS creation option. SetGCPs()
> and GetGCPS() are tested in
> https://trac.osgeo.org/gdal/browser/trunk/autotest/gdrivers/nitf.py#L1967
> 
> Even
> 
> --
> Spatialys - Geospatial professional services http://www.spatialys.com
> 
> The information in this e-mail transmission contains proprietary and
> business sensitive information.  Unauthorized interception of this e-mail
> may constitute a violation of law. If you are not the intended recipient,
> you are hereby notified that any review, dissemination, distribution or
> duplication of this communication is strictly prohibited. You are also
> asked to contact the sender by reply email and immediately destroy all
> copies of the original message.

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list