[GRASS-user] Import CH1903 Referenced Geodata

Hello There,

I'm trying to import the sample shapefile from

http://www.swisstopo.admin.ch/internet/swisstopo/en/home/products/downloads/landscape/vector25.html

(ArcView Shapefile) into GRASS 6.3.

I guess the Coordinate Reference System for the data is CH1903+ /LV95, EPSG code 2056. However if I create a new location with these CRS settings, I get the following error while trying to import the data:

> v.in.ogr geb_25_l.shp out=geb25
ERROR: Projection of dataset does not appear to match current location.

I get the same error message if I use the EPSG 4149,4150, 21781 settings.

However if I import the data by creating a new location, i.e.

> v.in.ogr geb_25_l.shp out=geb25 location=CHTopo

the data import works fine, however I get the following error if I try to change the projection settings:

XY-location cannot be projected

Does anybody has an idea how to fix this problem?

Sincerely,

Adrian Waddell

On Thu, Nov 13, 2008 at 03:58:34PM -0500, we recorded a bogon-computron collision of the <adrian@waddell.ch> flavor, containing:

Hello There,

I'm trying to import the sample shapefile from

http://www.swisstopo.admin.ch/internet/swisstopo/en/home/products/downloads/landscape/vector25.html

The shapefiles do not come with ".prj" files defining the coordinate system,
so Grass thinks they're just X/Y pairs with no specific projection. To use
them, you'll have to either tell GRASS to assume the data is in the same
projection as your location (and be correct that it is), or attach the right
projection information to the data (with some other utility).

the data import works fine, however I get the following error if I try
to change the projection settings:

XY-location cannot be projected

When you created a new location from the data, it had no idea what projection
to use, so created an X-Y location (undefined projection).

Does anybody has an idea how to fix this problem?

You need to determine what coordinate system the data really are in (by
finding associated metadata, as for example at http://gbs02.geotaskserver.com/swisstopo/getPresentationRequestResult.do?fileIdentifier=V25_all&profile=GM03Comprehensive&locale=en&format=html#N10351

This metadata, which I got to by following the "Vec25" link under "Products"
and then clicking the "metadata" link, claims the data is in CH1903 reference
system.

If you already have a CH1903 (EPSG number 4149) GRASS location, you can import
it to that location with the "-o" option of v.in.ogr, which will ignore the
apparent mismatch in projections --- that apparent mismatch is not real, because
the data itself have no proper indications of their projection, and they
are supposedly already in CH1903 (though they carry no information to signal
that fact to GRASS). Try using "v.in.ogr -o " in your CH1903 location,
and you'll probably find that all the data lines up where you expect it to be.

Your other option is to attach the right coordinate system to the data using
some utility like ogr2ogr (from GDAL):

  ogr2ogr -a_srs EPSG:4149 new_heb_25_l.shp heb_25_l.shp

will copy the shapefile to a new one, but create a .prj file with the CH1903
information in it. You could import this new shapefile into your CH1903
location without the "-o" option.

--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 http://kevan.org/brain.cgi?DDTNM
"Argue for your limitations and sure enough, they're yours." -- R. Bach

On Thu, Nov 13, 2008 at 02:40:52PM -0700, we recorded a bogon-computron collision of the <russo@bogodyn.org> flavor, containing:

On Thu, Nov 13, 2008 at 03:58:34PM -0500, we recorded a bogon-computron collision of the <adrian@waddell.ch> flavor, containing:
> Hello There,
>
> I'm trying to import the sample shapefile from
>
> http://www.swisstopo.admin.ch/internet/swisstopo/en/home/products/downloads/landscape/vector25.html

The shapefiles do not come with ".prj" files defining the coordinate system,
so Grass thinks they're just X/Y pairs with no specific projection. To use
them, you'll have to either tell GRASS to assume the data is in the same
projection as your location (and be correct that it is), or attach the right
projection information to the data (with some other utility).

[...]

>
> Does anybody has an idea how to fix this problem?

You need to determine what coordinate system the data really are in (by
finding associated metadata, as for example at http://gbs02.geotaskserver.com/swisstopo/getPresentationRequestResult.do?fileIdentifier=V25_all&profile=GM03Comprehensive&locale=en&format=html#N10351

This metadata, which I got to by following the "Vec25" link under "Products"
and then clicking the "metadata" link, claims the data is in CH1903 reference
system.

As Helmut points out, the e00 files say instead that the data is in an oblique
projection in meters, and looking at the shapefile data it does not look like
they are in CH1903/EPSG:4149 coordinates, despite the metadata saying they're
in CH1903.

You'll have to determine for sure which coordinates they really are, and import
into a grass location in *that* coordinate system, with v.in.ogr -o.

You might instead try importing the e00 versions, since those have spatial
reference system information embedded in them, unlike the shapefiles.

--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 http://kevan.org/brain.cgi?DDTNM
"Argue for your limitations and sure enough, they're yours." -- R. Bach

Hi Adrian,
the data are in CH1903/LV03 that correspond to the EPSG:21781.
The .prj produced with ArcMap is somehow not compatible with the right EPSG.
I usually create my location with that EPSG code, and then import with the override projection flag.

See below the WTK differences from ESRI AND OGC formats....

ESRI WTK:

PROJCS["CH1903 / LV03",
  GEOGCS["CH1903",
    DATUM["D_CH1903",
      SPHEROID["Bessel_1841",6377397.155,299.1528128]],
      PRIMEM["Greenwich",0],
      UNIT["Degree",0.017453292519943295]],
    PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],
    PARAMETER["latitude_of_center",46.95240555555556],
    PARAMETER["longitude_of_center",7.439583333333333],
    PARAMETER["azimuth",90],PARAMETER["rectified_grid_angle",90],
    PARAMETER["scale_factor",1],PARAMETER["false_easting",600000],
    PARAMETER["false_northing",200000],
    UNIT["Meter",1]]

OGC WTK:

PROJCS["CH1903 / LV03",
    GEOGCS["CH1903",
        DATUM["CH1903",
            SPHEROID["Bessel 1841",6377397.155,299.1528128,
                AUTHORITY["EPSG","7004"]],
            TOWGS84[674.374,15.056,405.346,0,0,0,0],
            AUTHORITY["EPSG","6149"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.01745329251994328,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4149"]],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    PROJECTION["Hotine_Oblique_Mercator"],
    PARAMETER["latitude_of_center",46.95240555555556],
    PARAMETER["longitude_of_center",7.439583333333333],
    PARAMETER["azimuth",90],
    PARAMETER["rectified_grid_angle",90],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",600000],
    PARAMETER["false_northing",200000],
    AUTHORITY["EPSG","21781"],
    AXIS["Y",EAST],
    AXIS["X",NORTH]]

Another option is to modify the .prj file with the correct one.

Adrian Waddell wrote:

Hello There,

I'm trying to import the sample shapefile from

http://www.swisstopo.admin.ch/internet/swisstopo/en/home/products/downloads/landscape/vector25.html

(ArcView Shapefile) into GRASS 6.3.

I guess the Coordinate Reference System for the data is CH1903+ /LV95, EPSG code 2056. However if I create a new location with these CRS settings, I get the following error while trying to import the data:

> v.in.ogr geb_25_l.shp out=geb25
ERROR: Projection of dataset does not appear to match current location.

I get the same error message if I use the EPSG 4149,4150, 21781 settings.

However if I import the data by creating a new location, i.e.

> v.in.ogr geb_25_l.shp out=geb25 location=CHTopo

the data import works fine, however I get the following error if I try to change the projection settings:

XY-location cannot be projected

Does anybody has an idea how to fix this problem?

Sincerely,

Adrian Waddell
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

--
-----------------------------------------------------
Dr. Massimiliano Cannata
Environmental & Geomatic Engineer

Institute of Earth Sciences - SUPSI
Trevano, C.P. 72, CH-6952 Canobbio, SWITZERLAND

Tel: +41 (0)58 / 666 62 14 Fax: +41 (0)58 / 666 62 09
E-mail: massimiliano.cannata@supsi.ch

Web: http://www.ist.supsi.ch
http://istgis.ist.supsi.ch:8001/geomatica/
-------------------------------------------------------

On Thu, Nov 13, 2008 at 11:15 PM, Tom Russo <russo@bogodyn.org> wrote:

As Helmut points out, the e00 files say instead that the data is in an oblique
projection in meters, and looking at the shapefile data it does not look like
they are in CH1903/EPSG:4149 coordinates, despite the metadata saying they're
in CH1903.

Please also note
http://trac.osgeo.org/grass/ticket/35
Verify and uncomment Swiss datum parameters

I dunno if it related but it waits for a volunteer.

Markus

Answer to the first question...

1) The parameters given are for CH1903+ which is apparently different from CH1903 - I have no idea how much or if the differences are big enough to be relevant.

The difference is relevant, because the CH1903 and CH1903+ are actually two different reference systems.

The Geodetic office (SwissTopo) says:
"The local reference system CH1903+ with its reference frame LV95 (Landesvermessung 1995) is derived from CHTRS95. In defining CH1903+, it was important that it remains as close as possible to the old reference system CH1903. The parameters defining the system were transferred from the old fundamental station (old observatory of Bern, which does not exist any more) to the new fundamental station in Zimmerwald. The reference frames LV03 and LV95 show differences of up to 1.6 metres because of the local distortions of LV03. These local distortions are modelled with a local affine transformation (program FINELTRA)"

So, I would say that the differences are relevant (at least for precision applications: cadaster, monitoring, etc..)

Massimiliano

Markus Neteler wrote:

On Thu, Nov 13, 2008 at 11:15 PM, Tom Russo <russo@bogodyn.org> wrote:
  

As Helmut points out, the e00 files say instead that the data is in an oblique
projection in meters, and looking at the shapefile data it does not look like
they are in CH1903/EPSG:4149 coordinates, despite the metadata saying they're
in CH1903.
    
Please also note
http://trac.osgeo.org/grass/ticket/35
Verify and uncomment Swiss datum parameters

I dunno if it related but it waits for a volunteer.

Markus
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

--
-----------------------------------------------------
Dr. Massimiliano Cannata
Environmental & Geomatic Engineer

Institute of Earth Sciences - SUPSI
Trevano, C.P. 72, CH-6952 Canobbio, SWITZERLAND

Tel: +41 (0)58 / 666 62 14 Fax: +41 (0)58 / 666 62 09
E-mail: massimiliano.cannata@supsi.ch

Web: http://www.ist.supsi.ch
http://istgis.ist.supsi.ch:8001/geomatica/
-------------------------------------------------------