shapefile transform

Frank Warmerdam warmerdam at POBOX.COM
Thu Sep 16 12:50:16 EDT 2004


David Bitner wrote:
> Off topic for mapserver list, but could anyone help me figure out a way to
> apply a scale transformation to a shapefile.
>
> I have locally surveyed data with the only connection to a "real" coordinate
> system being that if you multiply all the coordinates by a factor of
> .9999129 then you get the coordinates in State Plane.  Evidently this is the
> result of a mistake made 50 years ago that has been propogated ever since.
>
> Basically, since there is no projection information for this data and it is
> change in scale, rather than just an xy shift I am stuck on how to make the
> transformation using ArcGIS, OGR, or other tools.

David,

The shapelib package includes a contributed utility written by Bill Miller
called shputils that appears to include applying arbitrary factors to coordinates.

   http://shapelib.maptools.org/

I think you would use it like this but I have never tried it this way.

  shputils in.shp out.shp FACTOR INCH 99.99129

You might need to experiment a bit. The FACTOR stuff seems to default to
100'th of an "inch" for coordinates, but I think the above will fake out
the transformation stuff.

It should also be possible to fake out the shpproj utility included in
shapelib to accomplish the same thing, but I won't even try and describe
how that might work.

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