[GRASS-dev] Projection-problem
Paul Kelly
paul-grass at stjohnspoint.co.uk
Wed May 10 11:12:30 EDT 2006
Hello Stephan
On Wed, 10 May 2006, Stephan Holl wrote:
> Hello Paul,
>
> thanks for replying! I really appreaciate your comments (and
> sollutions).
Apologies for not really keeping up with the list at all recently; this
message just happened to catch my eye!
>> Hello Stephan
>> What is GK Zone 4 (DHDN)?
>
> This is similar to EPSG:31468, from Oracle Spatial Datasets.
OK sorry I was confused asking that---that field isn't used for
determining the projection; it is just meant to be human readable AFAIK
and it wasn't the problem.
>> 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?
Yes. I think the problem is the missing underscore _ between Transverse
and Mercator. Seems simple but confuses the OGR function and I'm really
not sure how best to handle it.
>> 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?
OK I've changed it now to print a warning if the projection name is
missing rather than giving a segfault (however the resulting projection
parameters will not be much use!).
Best regards
Paul
More information about the grass-dev
mailing list