Editing shape files...or altering output.

MapServer List mms at GNETCONSULTING.COM
Fri Oct 1 08:52:41 PDT 2004


Hello list:

I need to do something similar, except I need to add a record to
the DBF and save it, using PHP/MapScript.  Would I use the same
steps?  Or would it be easier to do it in a DBF editor of some sort?

My platform is Linux 9/PHP/MapServer 4.2.1.  Thanks.

Joel

----- Original Message -----
From: "Stephen Woodbridge" <woodbri at SWOODBRIDGE.COM>
To: <MAPSERVER-USERS at LISTS.UMN.EDU>
Sent: Friday, October 01, 2004 11:08 AM
Subject: Re: [UMN_MAPSERVER-USERS] Editing shape files...or altering output.


> 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