[mapserver-users] editing shp files

David Turover dturover at student.santarosa.edu
Tue Jul 30 10:38:50 EDT 2002


On Mon, 29 Jul 2002, Seamus Thomas Carroll wrote:
> Hi,
> 
> Does anyone know of a way to edit a shp file not using an esri product.  
> I have a file containing 950,000 Canadian postal codes and I want to 
> extract the British Columbia postal codes.  There are many attributes that 
> seperate BC postal codes from the rest of the country.  I want to split up 
> the postal code file to decrease the amount of time to display the 
> postal codes.
> 

You can use Frank's shapelib tools and roll your own: 
http://gdal.velocet.ca/projects/shapelib/

and especially:
http://gdal.velocet.ca/projects/shapelib/dbf_api.html

Since the data you want to access is probably going to be in the DBF file.

It may also be possible to pull the DBF data file into Microsoft Access 
and edit it there, but Access's DBF export capabilities suck. I find it 
easier to export from Access to a delimited text file and use dbfcreate 
on that.

However you edit it, you want to make sure that you don't sort or 
otherwise change the row order of the dbf file since the row order is how 
it maintains a link between the DBF and the shape data.




More information about the mapserver-users mailing list