[GRASS-dev] Projection-problem

Stephan Holl holl at gdf-hannover.de
Wed May 10 10:28:09 EDT 2006


Hello Paul,

thanks for replying! I really appreaciate your comments (and
sollutions).

On Wed, 10 May 2006 14:54:49 +0100 (BST) Paul Kelly
<paul-grass at stjohnspoint.co.uk> wrote:

> Hello Stephan
> What is GK Zone 4 (DHDN)? 

This is similar to EPSG:31468, from Oracle Spatial Datasets.

from my /usr/share/proj/epsg
# DHDN / Gauss-Kruger zone 4
<31468> +proj=tmerc +lat_0=0 +lon_0=12 +k=1.000000 +x_0=4500000 +y_0=0
+ellps=bessel +datum=potsdam +units=m +no_defs  <>

or, from GRASS
lib/gis/datum.table
# Potsdam Rauenberg 1950 DHDN
potsdam "Deutsches_Hauptdreiecksnetz"     bessel        dx=606.0
dy=23.0     dz=413.0

> It seems that the GDAL function 
> OSRExportToProj4() is returning a PROJ.4 string with a missing
> "proj=" parameter, because it can't convert "GK Zone 4 (DHDN)" into a
> projection. 

OK, thanks for clarifying this. But apparently ogrinfo returns at least
correct projections parameters like
PRIMEM["Greenwich",0.000000], UNIT["Decimal
Degree",0.01745329251994330]], PROJECTION["Transverse Mercator"],
    PARAMETER["Scale_Factor",1.000000],
    PARAMETER["Central_Meridian",12.000000],
    PARAMETER["False_Easting",4500000.000000],
    UNIT["Meter",1.000000000000],

Could that be a problem with the different strings from Oracle here?

> GRASS is crashing because it assumes that there will
> always be a proj= value, not unreasonable I don't think! I could
> change it so it won't segfault but I think it would be better if the
> OSRExportToProj4() function returned an error code when it can't
> determine the projection.

Yes, the latter would be the better choice afaik. Non-segfaults are
always appreciated :-) Would this be a big task and is it worth to 
have such a short-term solution?

Thanks for your help


	Stephan

-- 
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office      -     Mengendamm 16d      -     D-30177 Hannover
Internet: www.gdf-hannover.de      -      Email: holl at gdf-hannover.de
Phone : ++49-(0)511.39088507       -        Fax: ++49-(0)511.39088508




More information about the grass-dev mailing list