Editing shape files...or altering output.

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Fri Oct 1 11:08:36 EDT 2004


You can do this in Perl using Geo::ShapeFile or Geo::Shapelib which
might be the easiest way to do this. Your plan below is exactly how to
do it, but Perl might be easier to write if you are familiar with it.

I am not aware of any generic utilities that do this.

-Steve W.

Jerl Simpson wrote:

> Hello,
>
> I'm having a display issue that I need to work out.  I am wondering
> the best way to go about it.  Here's the issue.
> I have an ESRI shape file with US roads.  In this file, the US
> highways are listed as, "United States Highway 400".  When you have a
> lot of those on the map, it gets very messy. I would like to replace
> "United States Highway 400" with "US 400" or even "US Hwy 400".
> Is it best to change the .dbf file?  Or can I do this on the fly?
> I have no idea how to do this on the fly, but here are my thoughts on
> the dbf file.
>
> Use shapelib to open and read the dbf file, read in the values,
> compare, change if needed, then spit out to a new dbf file.
> Currently I would work at writing something to do this, after much
> reading of the documentation.
> Has anyone done this before?  I suspect there might be a utility to do
> just this type of thing.
>
> Thanks in advance,
>
> Jerl
>



More information about the mapserver-users mailing list