[Gdal-dev] Image Reprojection
Matt Lynch
matt at terraEngine.com
Thu Apr 3 17:15:01 EST 2003
Hi,
I am still digging in the proj4 documentation and my best guess now is:
gdalwarp -s_srs "+proj=tmerc +ellps=GRS80 +x_0=500000 +y_0=0 +lon_0=-115
+m=0.9992 +north" -t_srs "+proj=latlong +datum=WGS84"
jeffpan2000_10m.tif out.t
However, it still gives the same error.
In the proj4 documentation the command line uses -m 0.9992, but in gdal
all the parameters appear to be preceded by a +.
I am also unsure of +north.
The parameters I am trying to match are:
datum = Nad27
central meridan = -115
scale factor = 0.9992
lat of origin = 0
false E = 500,000
false N = 0
Thanks,
Matt
-----Original Message-----
From: gdal-dev-admin at remotesensing.org
[mailto:gdal-dev-admin at remotesensing.org] On Behalf Of Matt Lynch
Sent: Thursday, April 03, 2003 2:43 PM
To: gdal-dev at remotesensing.org
Subject: RE: [Gdal-dev] Image Reprojection
I have skimmed through the proj4 documentation and looks like I should
have something like ...
C:\gdal>gdalwarp -s_srs "+proj=tmerc +datum=WGS84 +x_0=500000 +y_0=0
+lat_0=0 -m
0.9992" -t_srs "+proj=latlong +datum=WGS84" jeffpan2000_10m.tif out.tif
ERROR 1: Can't find requested entry point: pj_strerrno
:0.ERROR 1: Reprojection failed, err = -14
ERROR 1: Reprojection failed, err = -14
ERROR 1: Reprojection failed, err = -14
ERROR 1: Reprojection failed, err = -14
ERROR 1: Reprojection failed, err = -14
ERROR 1: Reprojection failed, err = -14
ERROR 1: Reprojection failed, err = -14
ERROR 1: Reprojection failed, err = -14
ERROR 1: Reprojection failed, err = -14
ERROR 1: Reprojection failed, err = -14
ERROR 1: Reprojection failed, err = -14
ERROR 1: Reprojection failed, err = -14
ERROR 1: Reprojection failed, err = -14
ERROR 1: Reprojection failed, err = -14
ERROR 1: Reprojection failed, err = -14
ERROR 1: Reprojection failed, err = -14
ERROR 1: Reprojection failed, err = -14
ERROR 1: Reprojection failed, err = -14
ERROR 1: Reprojection failed, err = -14
ERROR 1: Reprojection failed, err = -14, further errors will be
supressed on the transform object.
..10...20...30...40...50...60...70...80...90...100 - done.
As you can see it doesn't work yet.
My input source parameters are
"+proj=tmerc +datum=WGS84 +x_0=500000 +y_0=0 +lat_0=0 -m 0.9992"
But I haven't seen how to specify the central meridian.
Any thoughts?
Thanks,
Matt
-----Original Message-----
From: gdal-dev-admin at remotesensing.org
[mailto:gdal-dev-admin at remotesensing.org] On Behalf Of Matt Lynch
Sent: Thursday, April 03, 2003 2:09 PM
To: gdal-dev at remotesensing.org
Subject: RE: [Gdal-dev] Image Reprojection
Hi Frank,
The gdalinfo report of the source file is:
C:\gdal>gdalinfo jeffpan2000_10m.tif
Driver: GTiff/GeoTIFF
Size is 2000, 2000
Coordinate System is `'
Origin = (644995.948217,5518006.066294)
Pixel Size = (10.000000,-10.000000)
Metadata:
TIFFTAG_DOCUMENTNAME=jeffpan2000_10m.tif
TIFFTAG_SOFTWARE=ImageMagick 5.5.2 12/01/02 Q8
http://www.imagemagick.org Corner Coordinates: Upper Left ( 644995.948,
5518006.066) Lower Left ( 644995.948, 5498006.066) Upper Right (
664995.948, 5518006.066) Lower Right ( 664995.948,
5498006.066)
Center ( 654995.948, 5508006.066)
Band 1 Block=2000x4 Type=Byte, ColorInterp=Gray
As for 10TM, it is used for Alberta.
datum = Nad27
central meridan = -115
scale factor = 0.9992
lat of origin = 0
false E = 500,000
false N = 0
I will look into the proj4 site as you have suggested.
Thanks,
Matt
-----Original Message-----
From: gdal-dev-admin at remotesensing.org
[mailto:gdal-dev-admin at remotesensing.org] On Behalf Of Frank Warmerdam
Sent: Thursday, April 03, 2003 12:57 PM
To: gdal-dev at remotesensing.org
Subject: Re: [Gdal-dev] Image Reprojection
Matt Lynch wrote:
> Hi Frank,
>
>
>>I believe this is a commandline parsing issue. The '+proj=latlong
>
> +datum=WGS84' would be parsed as a single argument by a Unix shell,
> +but
> the DOS shell doesn't work the same.
>
> That makes sense. I added a forth option and used double quotes (I
> can recall using them in the past within dos to bypass the
> whitespace).
>
> Now I get
> ----------------------------------------------------------------------
> --
> --------
> C:\gdal>gdalwarp -t_srs "+proj=latlong +datum=WGS84"
jeffpan2000_10m.tif
> out.tif
>
> ERROR 1: Failed to import coordinate system `'.
> Creating output file is that 2000P x 2000L.
> ERROR 1: Failed to import coordinate system `'.
> :0...10...20...30...40...50...60...70...80...90...100 - done.
> ----------------------------------------------------------------------
> --
> --------
>
> The output file is created, but it doesn't look like the conversion
> happens. The line 'FAILED to import coordinate system' is probably
> the source of my trouble now (image is in 10TM).
>
> How can I specify a input coordinate system like 10TM
Matt,
It isn't clear from the message whether the coordinate system that
failed to "import" was the target one you provided on the commandline or
the one on the source file. What does gdalinfo report on the source
file?
If it has no coordinate system set you could use the -s_srs option to
set the source coordinate system.
gdalwarp -s_srs "+proj=utm +zone=10 +datum=WGS84" -t_srs
"+proj=latlong +datum=WGS84" jeffpan2000_10m.tif
The coordinate system descriptions are from PROJ.4, so you should review
the
(fragmented) PROJ.4 docs to learn how to do different coordinate
systems. I assume that "10TM" is "UTM Zone 10". I am not familiar with
"10TM" as a coordinate system name.
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 Programmer for Rent
_______________________________________________
Gdal-dev mailing list
Gdal-dev at remotesensing.org
http://remotesensing.org/mailman/listinfo/gdal-dev
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.467 / Virus Database: 266 - Release Date: 4/1/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.467 / Virus Database: 266 - Release Date: 4/1/2003
_______________________________________________
Gdal-dev mailing list
Gdal-dev at remotesensing.org
http://remotesensing.org/mailman/listinfo/gdal-dev
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.467 / Virus Database: 266 - Release Date: 4/1/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.467 / Virus Database: 266 - Release Date: 4/1/2003
_______________________________________________
Gdal-dev mailing list
Gdal-dev at remotesensing.org
http://remotesensing.org/mailman/listinfo/gdal-dev
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.467 / Virus Database: 266 - Release Date: 4/1/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.467 / Virus Database: 266 - Release Date: 4/1/2003
More information about the Gdal-dev
mailing list