[gdal-dev] Re: Change the spatial reference of a shapeile

Solimyr giannicristian at msn.com
Tue Jul 12 04:01:13 EDT 2011


Thx for the answers, now I get the right srs but the extent is different:

SHAPE 1 ( the one where I want to get the info and copy to the new)
$ ogrinfo -al provaimp.shp
INFO: Open of `provaimp.shp'
      using driver `ESRI Shapefile' successful.

Layer name: provaimp
Geometry: Polygon
Feature Count: 2
Extent: (15.548977, 38.176478) - (15.551497, 38.179126)
Layer SRS WKT:
GEOGCS["GCS_WGS_1984",
    DATUM["WGS_1984",
        SPHEROID["WGS_1984",637813.0,298.252223563]],
    PRIMEM["Greenwich",0.0],
    UNIT["Degree",0.0174532925199433]]
Id: Integer (6.0)
OGRFeature(provaimp):0
  Id (Integer) = 0
  POLYGON ((15.550555060572606 38.17912619284624,15.550983363553598
38.179090500931238,15.550690689850001 38.177876975818322,15.550383739380152
38.17775562330695,15.550555060572606 38.17912619284624))

OGRFeature(provaimp):1
  Id (Integer) = 0
  POLYGON ((15.548977477925689 38.177298766793797,15.550590752487608
38.177363012241017,15.551497327130903 38.176527821427953,15.549598517248228
38.176477852746871,15.548977477925689 38.177298766793797))

SHAPE 2 (the one with wrong extent but (now) correct srs)
$ ogrinfo -al mean_provaimp.shp
INFO: Open of `mean_provaimp.shp'
      using driver `ESRI Shapefile' successful.

Layer name: mean_provaimp
Geometry: Polygon
Feature Count: 2
Extent: (0.000000, 0.000000) - (376.000000, 390.000000)
Layer SRS WKT:
GEOGCS["GCS_WGS_1984",
    DATUM["WGS_1984",
        SPHEROID["WGS_1984",637813.0,298.252223563]],
    PRIMEM["Greenwich",0.0],
    UNIT["Degree",0.017453292519943295]]
VALUE: Real (26.6)
OGRFeature(mean_provaimp):0
OGRFeature(mean_provaimp):0
  VALUE (Real) =                 33.124565
  POLYGON ((15.550555060572606 38.17912619284624,15.550983363553598
38.179090500931238,15.550690689850001 38.177876975818322,15.550383739380152
38.17775562330695,15.550555060572606 38.17912619284624))

OGRFeature(mean_provaimp):1
  VALUE (Real) =                  45.133755
  POLYGON ((15.548977477925689 38.177298766793797,15.550590752487608
38.177363012241017,15.551497327130903 38.176527821427953,15.549598517248228
38.176477852746871,15.548977477925689 38.177298766793797))


Do you know where the extent information of the shapefile are preserve?So I
can get, copy and paste or doing something similar...


--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Change-the-spatial-reference-of-a-shapeile-tp6561998p6574135.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list