[GRASS-dev] S-JTSK strikes back

Paul Kelly paul-grass at stjohnspoint.co.uk
Fri May 4 07:18:09 EDT 2007

OK I think I see now what you are noticing. This seems like a slightly
different problem again from the one we came across last time. In general
I think the Krovak support in OGR/PROJ needs completely re-done using
proj=kocc; it is not enough to keep coming across little issues like this
and filing bug reports for OGR but anyway let's have a look...

On Thu, 3 May 2007, Markus Neteler wrote:

> On Thu, May 03, 2007 at 12:09:19PM +0200, Markus Neteler wrote:
> cat Area_topolcianky.prj
> PROJCS["S-JTSK_Krovak",GEOGCS["GCS_S_JTSK",DATUM["D_S_JTSK",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Krovak"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Pseudo_Standard_Parallel_1",78.5],PARAMETER["Scale_Factor",0.9999],PARAMETER["Azimuth",30.28813975277778],PARAMETER["Longitude_Of_Center",24.83333333333333],PARAMETER["Latitude_Of_Center",49.5],PARAMETER["X_Scale",1.0],PARAMETER["Y_Scale",1.0],PARAMETER["XY_Plane_Rotation",0.0],UNIT["Meter",1.0]]

Saving this to a file tmp.prj and running g.proj -p wkt=tmp.prj gives

name       : Krovak
proj       : krovak
ellps      : bessel
lat_0      : 49.5
lon_0      : 24.83333333333333
alpha      : 30.28813975277778
k          : 0.9999
x_0        : 0
y_0        : 0
no_defs    : defined
unit       : Meter
units      : Meters
meters     : 1

> g.proj wkt=Area_topolcianky.prj
> WARNUNG: Datum 'Jednotne_Trigonometricke_Site_Katastralni' not recognised
>         by GRASS and no parameters found.
> g.proj -w
> PROJCS["Krovak",
>    GEOGCS["bessel",
>        DATUM["unknown",
>            SPHEROID["Bessel_1841",6377397.155,299.1528128]],
>        PRIMEM["Greenwich",0],
>        UNIT["degree",0.0174532925199433]],
>    PROJECTION["Krovak"],
>    PARAMETER["latitude_of_center",49.5],
>    PARAMETER["longitude_of_center",24.83333333333333],
>    PARAMETER["azimuth",0],
>    PARAMETER["pseudo_standard_parallel_1",0],
>    PARAMETER["scale_factor",0.9999],
>    PARAMETER["false_easting",0],
>    PARAMETER["false_northing",0],
>    UNIT["Meter",1]]
> It has picked up at least 0.9999 (lost pseudo_standard_parallel_1 etc).

This goes through two translations here (WKT to GRASS format and back to 
WKT), so is more complicated and I will come back to it later. But note 
that scale_factor =0.9999 is present in the orginal WKT above. I see 
Pseudo Standard Parallel is gone, but again have to ask - is it important 
for the PROJ.4 version of proj=krovak? I really have no idea.

> If I do the same with OGR, I get
> ogrinfo -so Area_topolcianky.shp Area_topolcianky
> INFO: Open of `Area_topolcianky.shp'
>      using driver `ESRI Shapefile' successful.
> Layer name: Area_topolcianky
> Geometry: Polygon
> Feature Count: 1
> Extent: (1255514.000000, 473866.000000) - (1256400.000000, 474752.000000)
> Layer SRS WKT:
> PROJCS["S-JTSK_Krovak",
>        DATUM["Jednotne_Trigonometricke_Site_Katastralni",
>            SPHEROID["Bessel_1841",6377397.155,299.1528128]],
>        PRIMEM["Greenwich",0.0],
>        UNIT["Degree",0.0174532925199433]],
>    PROJECTION["Krovak"],
>    PARAMETER["False_Easting",0.0],
>    PARAMETER["False_Northing",0.0],
>    PARAMETER["Pseudo_Standard_Parallel_1",78.5],
>    PARAMETER["Scale_Factor",0.9999],
>    PARAMETER["Azimuth",30.28813975277778],
>    PARAMETER["Longitude_Of_Center",24.83333333333333],
>    PARAMETER["Latitude_Of_Center",49.5],
>    PARAMETER["X_Scale",1.0],
>    PARAMETER["Y_Scale",1.0],
>    PARAMETER["XY_Plane_Rotation",0.0],
>    UNIT["Meter",1.0]]
> Id: Integer (6.0)
> AREA: Real (19.11)
> PERIM: Real (19.11)
> Apparently GRASS is still lacking something.

The WKT description here is just an exact copy of the one you posted at 
the top of the e-mail there and hasn't been processed at all. So no 
surprises that it hasn't changed.

Therefore it seems some information (the pseudo standard parallel value) 
is lost when converting from WKT into GRASS format, and some more 
information (the alpha value) is lost when converting from GRASS format 
back to WKT. Is this important? I don't know anyway how important alpha 
and pseudo standard parallel are. Are they important for proj=krovak or 
does it just ignore it? It seems alpha corresonds to Azimuth in the WKT and 
OSRImportFromProj4() isn't converting it properly, but I really don't know 
how important it is for proj=krovak so wouldn't like to get too deeply 
involved there... Likewise for Pseudo_Standard_Parallel_1 and 


More information about the grass-dev mailing list