[Gdal-dev] SRS not properly defined
Petteri Packalen
packalen at cs.joensuu.fi
Sat Dec 17 12:18:40 EST 2005
Frank,
> On 12/16/05, Petteri Packalen <packalen at cs.joensuu.fi> wrote:
>> Projection WKT is *always* printed properly. However, projection is saved
>> into file only in the case of euref_fin-projection. Other projection
>> deinitions are not saved into the output file. The wkt which succeeds is
>> the only one that is not (yet) widely used - therefore it does not exists
>> e.g. in the EPSG library (not at least last time I checked). I'm rather
>> sure my wkt strings are correct. I have used these already some years
>> such a manner that I save a string into prj file without any problem.
>> Wkt strings are copied from ESRI prj files.
>
> You haven't specified what format you are working with, nor
> given the details of the problem coordinate systems, so
> it is hard to say much.
I tested it with HFA and GTiff - both fails. CSs which fails are EPSG
2391, 2392, 2393 and 2394.
> I will say that you code looks fine, so it is likely an
> issue with whether the format in question supports
> the particular projection(s) you are using. The other
> thing is that if the projection definitions are coming
> from an ESRI source they likely ought to be normalized
> into OGR WKT format by doing a morphFromESRI()
> on an ORSpatialReference.
I tested morphFromESRI but it didn't correct the problem. I solved the
issue using OGRSpatialReference::importFromEPSG and
OGRSpatialReference::exportToWkt methods. First I imported valid WKTs
using EPSG codes, then I printed valid WKTs and pasted these into my code.
I want to avoid additional dependencies in this particular program and
therefore I don't want to include GDAL data directory into this project.
That's the reason why I don't want to use importFromEPSG() in the final
version.
Anyway, WKTs copied from the esri prj fails. Let me know if I can help in
this issue somehow.
Regards,
Petteri
More information about the Gdal-dev
mailing list