Opened 7 years ago
Closed 7 years ago
#6340 closed defect (invalid)
GDAL doesn't support some Proj4 variable flags (ex. no_rot)
Reported by: | bmoregeo | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | 1.10.1 |
Severity: | normal | Keywords: | no_rot, axis, proj4 |
Cc: |
Description
I am trying to add projection information to an existing raster using a proj4 string.
The input proj4 string is as follows
+proj=omerc +lat_0=0 +lonc=0 +alpha=87.90209000000001 +x_0=10394275.61336197 +y_0=5942765.637300909 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +to_meter=0.04583774658203 +no_defs +no_rot +axis=end
When I execute
gdal_translate -of PNG -a_srs "+proj=omerc +lat_0=0 +lonc=0 +alpha=87.90209000000001 +x_0=10394275.61336197 +y_0=5942765.637300909 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +to_meter=0.04583774658203 +no_defs +no_rot +axis=end" sample.png cli_prj.png
gdalinfo -proj4 cli_prj.png
the resulting proj4 string is missing the +no_rot and +axis=end flags
+proj=omerc +lat_0=0 +lonc=0 +alpha=87.90209000000001 +k=1 +x_0=10394275.61336197 +y_0=5942765.637300907 +gamma=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +to_meter=0.04583774658203 +no_defs
Attachments (1)
Change History (4)
comment:1 by , 7 years ago
comment:3 by , 7 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
I'm going to close this without further action. I had prepared a patch to issue a debug message when proj parameters aren't used, but it has some shortcomings and I don't believe it is really needed after all. Attaching it however in case it might be helpful
by , 7 years ago
Attachment: | 6340.patch added |
---|
Add debug message if some proj.4 parameters aren't used
You can add +wktext at the end of the proj4 string to solve this: See http://www.gdal.org/classOGRSpatialReference.html#af1a29550373c2c14bd11514641e58e7c