[GRASS-dev] Projection-problem

Paul Kelly paul-grass at stjohnspoint.co.uk
Wed May 10 09:54:49 EDT 2006


Hello Stephan
What is GK Zone 4 (DHDN)? 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. 
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.

Paul

On Wed, 10 May 2006, Stephan Holl wrote:

> Dear lists,
>
> [first posted to grass5, therefor reposted, since it did not make the
> way to grass-dev]
>
> I have a strange problem regarding Oracle spatial datasets.
>
> My dataset has the following projection:
>
> Extent: (4452550.890000, 5324953.370000) - (4479484.079834,
> 5345694.049805) Layer SRS WKT:
> PROJCS["GK Zone 4 (DHDN)",
>    GEOGCS[,
>        DATUM[,
>            SPHEROID["Bessel
> 1841",6377397.155,299.1528128],582.000000,105.000000,414.000000,-1.040000,-0.350000,3.080000,8.300000],
> 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],
>    AUTHORITY["Oracle","82032"]]
> [Columns follow here]
>
>
> Note that the datum-parameter is empty.
>
> I can "export" the data into shp using ogr2ogr which results in a shape
> with the following proj-information:
>
> Feature Count: 10584
> Extent: (4452550.890000, 5324953.370000) - (4479484.079834,
> 5345694.049805) Layer SRS WKT:
> PROJCS["GK Zone 4 (DHDN)",
>    GEOGCS[,
>        DATUM["Mean_Sea_Level",
>            SPHEROID["Bessel
> 1841",6377397.155,299.1528128],582.000000,105.000000,414.000000,-1.040000,-0.350000,3.080000,8.300000],
> 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],
>    AUTHORITY["Oracle","82032"]]
>
> Here you can see that the Datum now contains "Mean_Sea_Level". When
> inspecting the written .prj-file from the shape I cannot find any entry
> in the datum-parameters like "Mean_Sea_Level".
>
> Is this the normal behaviour? I am asking, because GRASS segfaults
> when using v.in.ogr with location=newloc parameter enabled.
>
> I am using gdal-1.3.1, grass61 from todays CVS.
>
> Currently out of ideas...
>
> Thanks for your help.
>
> Best
> 	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
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
>




More information about the grass-dev mailing list