[GRASS-user] WKT format in setting a location

Hi,

When creating a LOCATION, a WKT definition can be used to set a coordinate
reference system.

WKT formats come in a number of formats (as listed through the command
gdalsrsinfo -o all EPSG:n): OGC, OGC-simple, OGC-no CT, and ESRI (e.g., a
shapefile's PRJ file).

Is any format preferred or all are equally acceptable? The differences
include omitting AUTHORITY details.

From testing using one EPSG code, it appears that the CRS is set correctly

within GRASS using all WKT formats, but just wanted to confirm as cannot
find in documentation.

Thanks,
Richard

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/WKT-format-in-setting-a-location-tp4999225.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Sun, Sep 2, 2012 at 7:48 AM, RichardC <richtcooper@hotmail.com> wrote:

Hi,

When creating a LOCATION, a WKT definition can be used to set a coordinate
reference system.

WKT formats come in a number of formats (as listed through the command
gdalsrsinfo -o all EPSG:n): OGC, OGC-simple, OGC-no CT, and ESRI (e.g., a
shapefile's PRJ file).

Is any format preferred or all are equally acceptable? The differences
include omitting AUTHORITY details.

For such cases of self-composing WKT files, I always use this tool:
gdal/apps/testepsg.cpp

(needs compilation of course)

Example:

testepsg swiss_ch1903.prj
Validate Succeeds. <-------- :slight_smile:
WKT[swiss_ch1903.prj] =
PROJCS["Swiss. Obl. Mercator",
    GEOGCS["bessel",
        DATUM["CH1903",
            SPHEROID["Bessel_1841",6377397.155,299.1528128],
            TOWGS84[674.374,15.056,405.346,0,0,0,0]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Hotine_Oblique_Mercator"],
...

Of course the tool only makes a formal test and won't test if
the inserted values are right, it just tests their position within the
WKT structure.

Markus