[FWTools] Problem with the GetGCPCount of GDAL wrongly returning 0
for a JPG file
Mikael Rittri
Mikael.Rittri at carmenta.com
Wed Nov 19 08:27:16 EST 2008
Hello,
I have a problem with a JPG file.
When I apply gdalinfo, the information says that there are 16 ground control points,
although their coordinate reference system is not known. I am pretty certain that
they are given in WGS84 long/lat, though.
When I try to use the JPG file in Carmenta Engine, which uses the GDAL library,
there is a call to GDALPamDataset::GetGCPCount(), which calls GDALDataset::GetGCPCount(),
which always returns 0.
I expected 16, since that is what gdalinfo says. Am I wrong in using
the GetGCPCount(), or have I forgot to call some initialization method?
By the way, gdalinfo says:
Driver: JPEG/JPEG JFIF
Files: X:\Proj\ ... \MAL5C5MB.JPG
Size is 5756, 3767
Coordinate System is `'
GCP Projection =
GCP[ 0]: Id=Pt 1, Info=
(847,625) -> (99,7,0)
GCP[ 1]: Id=Pt 2, Info=
(844,2725) -> (99,3,0)
GCP[ 2]: Id=Pt 3, Info=
(5041,2730) -> (107,3,0)
GCP[ 3]: Id=Pt 4, Info=
(5043,629) -> (107,7,0)
GCP[ 4]: Id=Pt 5, Info=
(1892,2725) -> (101,3,0)
GCP[ 5]: Id=Pt 6, Info=
(3992,1680) -> (105,5,0)
GCP[ 6]: Id=Pt 7, Info=
(845,1676) -> (99,5,0)
GCP[ 7]: Id=Pt 8, Info=
(842,3767) -> (99,1,0)
GCP[ 8]: Id=Pt 9, Info=
(1894,1677) -> (101,5,0)
GCP[ 9]: Id=Pt 10, Info=
(2944,1679) -> (103,5,0)
GCP[ 10]: Id=Pt 11, Info=
(5042,1681) -> (107,5,0)
GCP[ 11]: Id=Pt 12, Info=
(3993,628) -> (105,7,0)
GCP[ 12]: Id=Pt 13, Info=
(2945,627) -> (103,7,0)
GCP[ 13]: Id=Pt 14, Info=
(1895,626) -> (101,7,0)
GCP[ 14]: Id=Pt 15, Info=
(2943,2727) -> (103,3,0)
GCP[ 15]: Id=Pt 16, Info=
(2942,3767) -> (103,1,0)
GCP[ 16]: Id=Pt 17, Info=
(3991,2728) -> (105,3,0)
etc. etc.
Best regards,
--
Mikael Rittri
Carmenta AB
Box 11354
SE-404 28 Göteborg
Visitors: Sankt Eriksgatan 5
SWEDEN
Tel: +46-31-775 57 37
Mob: +46-703-60 34 07
mikael.rittri at carmenta.com
www.carmenta.com
More information about the FWTools
mailing list