Opened 11 years ago

Last modified 10 years ago

#4910 closed defect

ogr2ogr does not know +no_uoff parameter — at Version 1

Reported by: 45136 Owned by: warmerdam
Priority: normal Milestone: 1.11.1
Component: OGR_SF Version: 1.10.0
Severity: normal Keywords:
Cc:

Description (last modified by 45136)

I want to transform vector data from wgs84 to Michigan Georef. With cs2cs, transformation works ok:

echo epsg 4326-3078 >out.txt
cs2cs +init=epsg:4326 +to +init=epsg:3078 in.txt >>out.txt
echo epsg 4326-projstring with no_uoff>>out.txt
cs2cs +init=epsg:4326 +to +proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.25556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +no_uoff +gamma=337.25556 +datum=NAD83 +units=m +no_defs in.txt >>out.txt
echo epsg 4326-projstring with no_off>>out.txt
cs2cs +init=epsg:4326 +to +proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.25556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +no_off +gamma=337.25556 +datum=NAD83 +units=m +no_defs in.txt >>out.txt
echo epsg 4326-projstring without no_uoff >>out.txt
cs2cs +init=epsg:4326 +to +proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.25556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +gamma=337.25556 +datum=NAD83 +units=m +no_defs in.txt >>out.txt

in.txt contains just

-83 44

The first three operations result to

740335.15	387567.53 0.00

The last one to

2787226.40	-4495042.59 0.00

which is obviously wrong (all data from inside Michigan state should be positive).

Then I created a sample vector grid 1°x1° of the area, and performed the follwing transformations:

ogr2ogr -s_srs epsg:4326 -t_srs "+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.25556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +no_uoff +gamma=337.25556 +datum=NAD83 +units=m +no_defs" Mich-proj_no_uoff.shp Mich-wgs84.shp
ogr2ogr -s_srs epsg:4326 -t_srs "+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.25556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +no_off +gamma=337.25556 +datum=NAD83 +units=m +no_defs" Mich-proj_no_off.shp Mich-wgs84.shp
ogr2ogr -s_srs epsg:4326 -t_srs "+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.25556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +gamma=337.25556 +datum=NAD83 +units=m +no_defs" Mich_proj.shp Mich-wgs84.shp
ogr2ogr -s_srs epsg:4326 -t_srs epsg:3078 Mich_3078.shp Mich-wgs84.shp

All shapefiles have an extend of around the wrong cs2cs value. Which means that the +no_uoff or +no_off parameter is ignored in ogr2ogr. As a consequence, all original Michigan Georef shapefiles are totally misplaced in Quantum Gis dependig on GDAL, while they are well aligned in uDig and Arcgis.

Tested on Windows 7, if that may have an influence.

Change History (2)

by 45136, 11 years ago

Attachment: Mich-wgs84.zip added

sample vector grid 1°x1° in WGS84

comment:1 by 45136, 11 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.