Jukka Rahkonen wrote:
Hi,

With Mapserver I am used to correct projection parameters, if needed, by editing
directly the projection file which is in MS4W package located at
\ms4w\proj\nad\epsg. Now I tried to do the same with FWTools 2.4.2. There is a file with promising
name at \FWTools2.4.2\proj_lib\epsg.  However, I am pretty sure that editing
this file does not change the behaviour of ogr2ogr in any way. Is FWTools taking
the projection definitions from some other place or am I doing something wrong?

What I tried to do was to add +towgs84 parameters. Original line is this 3067> +proj=utm +zone=35 +ellps=GRS80 +units=m +no_defs <> and I modified it to this:
3067> +proj=utm +zone=35 +ellps=GRS80
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>

FWTools epsg file is having correct parameters for EPSG:2393 projection, but it
seems to me but they are not used either in real use. Only way to get correct
results when reprojecting from epsg:3067 to epsg:2393 is to give both
projections as +proj strings this way

ogr2ogr -f "ESRI Shapefile" output.shp input.shp
-t_srs "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=3500000 +y_0=0 +ellps=intl +towgs84=-96.0617,-82.4278,-121.743,4.80107,0.34543,
-1.37646,1.4964 +units=m"
-s_srs "+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"

Giving -t_srs or s_srs as epsg:2393 epsg:3067, respectively, gives a faulty
result which means that +towgs84 parameters are not used at all.

Jukka,

The primary source for EPSG lookups for GDAL utilities is the
gdal/data/pcs.csv and gdal/data/gcs.csv files.  There is logic to
look in a few other places too if a srs is not found in those locations.

In order to introduce a towgs84 parameter for a gcs the normal procedure
is to copy the definition from gcs.csv into gcs.override.csv and add
the towgs84 parameters.  There should be sufficient examples to see how
that might work.

These csv files are found in FWTools\data I believe.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [email protected]
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
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to