simple tool for conversion

Joseph Norris sirronj at PACBELL.NET
Wed Dec 8 09:08:38 PST 2004


Thank you Frank - this has made a great deal of sense to me.

Can I get that information from the .prj file that comes with my map?

Here it is - though I don't know how to read it.

PROJCS["NAD_1983_StatePlane_California_II_FIPS_0402_Feet",
GEOGCS["GCS_North_American_1983",
DATUM["D_North_American_1983",
SPHEROID["GRS_1980", 6378137, 298.257222101]],
PRIMEM["Greenwich", 0],
UNIT["Degree", 0.017453292519943295]],
PROJECTION["Lambert_Conformal_Conic"],
PARAMETER["False_Easting", 6561666.666666666],
PARAMETER["False_Northing", 1640416.666666667],
PARAMETER["Central_Meridian", -122],
PARAMETER["Standard_Parallel_1", 38.33333333333334],
PARAMETER["Standard_Parallel_2", 39.83333333333334],
PARAMETER["Latitude_Of_Origin", 37.66666666666666],
UNIT["Foot_US", 0.30480060960121924]]

#Joseph Norris (Perl - what else is there?/Linux/CGI/Mysql) print @c=map chr
$_+100,(6,17,15,16,-68,-3,10,11,16,4,1,14,-68,12,1,14,8,-68,4,-3,-1,7,1,14,-
68,-26,11,15,1,12,4,-68,-22,11,14,14,5,15,-90);

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at lists.umn.edu]On
Behalf Of Frank Warmerdam
Sent: Wednesday, December 08, 2004 9:04 AM
To: MAPSERVER-USERS at lists.umn.edu
Subject: Re: [UMN_MAPSERVER-USERS] simple tool for conversion

On Wed, 8 Dec 2004 08:53:47 -0800, Joseph Norris <sirronj at pacbell.net>
wrote:
> Then I went and used fGIS and plotted some points on a layer over my
> California map and I got the following:
>
> File Bounds: ( 6471392.899,  282843.628,0,0)
>          to  ( 8433025.828, 2304680.124,0,0)


Joseph,

Well, the above is the fundamental information you didn't supply
in your original query.  You have existing data in some projected
coordinate system, and you want to produce a shapefile in
the same coordinate system from latlong input points.

You won't get anywhere till you figure out what coordinate system
you are working with.  Likely some sort of state plane feet
coordinate system though the distances look awfully large and
suggest to me that data is outside the normal area of use of
the coordinate system.

Once you know the coordinate system you could use the
ogr2ogr utility to reproject your lat/long shapefile to the
target coordinate system specified using PROJ.4 syntax.

eg.
ogr2ogr -s_srs WGS84 -t_srs '+proj=...' out.shp in.shp

If you just want to use the data in MapServer you don't actually
have to reproject the data ahead of time, though it might be a good
idea.

But you do need to properly declare your coordinate system of
which there are many thousands of frequently used ones in the world.
Till you know the details of your coordinate system you really don't
know anything about what the x/y coordinate values mean.

Best regards,

--
---------------------------------------+------------------------------------
--
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the MapServer-users mailing list