[Mapserver-users] Reprojection of shape file.

Jason M. Nielsen jnielsen at aero-graphics.com
Thu Feb 5 17:21:30 EST 2004


Quoting Pericles Nacionales <nacional at cbs.umn.edu>:

> 
> Why don't you run ogrinfo on your data and see if the extents are actually
> in latlong?  Or if the shapefiles include a .PRJ extension, open it up and
> see what the projection is.  If they are in latlong, run cs2cs to
> reproject the extents to the stateplane cs.

Its definitely in latlong wgs84 according to the file but I questioned wether
the proper coordinate system was assigned for the data. Below I have listed out
what I know of the file and my results from other commands. I was unaware of the
existence of "cs2cs". Nice utility to have.

Based on what I can tell something is goofy. Those coordinates output from cs2cs
are nowhere near data I know to be good. Again, looks like I am doing something
wrong or the data is munged.

Could the coordinates in the shape file listed below be the reason for the ERROR
1 I experienced before with ogr2ogr?

[root at vad3rZIM data]# cs2cs +proj=latlong +datum=NAD83 +to +proj=lcc
+datum=NAD83 -r EOF
Rel. 4.4.7, 31 March 2003
<cs2cs>: 
Sys errno: 2: <system mess. texts unavail.>
EOF
[root at vad3rZIM data]# cs2cs +proj=latlong +datum=NAD83 +to +proj=lcc +datum=NAD83 -r
40.430850 111.779615
7230060.25      9889135.69 0.00
40.845718 112.121004
7196382.84      9931470.40 0.00

[root at vad3rZIM data]# ogrinfo -al slc2002photos.shp | more
INFO: Open of `slc2002photos.shp'
using driver `ESRI Shapefile' successful.

Layer name: slc2002photos
Geometry: Polygon
Feature Count: 392
Extent: (40.430850, 111.779615) - (40.845718, 112.121004)
Layer SRS WKT:
GEOGCS["GCS_WGS_1984",
    DATUM["WGS_1984",
        SPHEROID["WGS_1984",6378137.0,298.257223563]],
    PRIMEM["Greenwich",0.0],
    UNIT["Degree",0.0174532925199433]]


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/



More information about the mapserver-users mailing list