[maplab-users] How to add dynamic data

Zak James zak4ms at gmail.com
Tue Sep 20 08:49:29 EDT 2005


Valerio,

You could write a program or script (in C, PHP, python, perl, etc.)
that uses shapelib (http://shapelib.maptools.org) to create a
shapefile.

An easier alternative is to make an OGR
(http://gdal.maptools.org/ogr/) layer in maplab and create a virtual
driver file to interface with your text file. You can read about how
to do that here:
http://gdal.maptools.org/ogr/drv_vrt.html

You could also use the ogr2ogr command line utility (part of ogr) to
create a shapefile once you have a valid vrt file.

There's a useful reference here:
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?VirtualSpatialData
though it focuses on odbc database connections rather than text files.
It gives a sample mapfile layer which will demonstrate how to set up
your own.

zak

On 9/19/05, pforce at libero.it <pforce at libero.it> wrote:
> Hi!
> I'm a new user of MS4W and mapLab. I'm creating my map using some layers found in ESRI site. Now i want to add a new layer using some data (x/y coord and description) that i've in a .txt file. How can I create .shp/.shx files starting from text value?
> 
> Tks to all!!
> Valerio - Italy
> 
> 
> _______________________________________________
> Maplab-users mailing list
> Maplab-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/maplab-users
> 


-- 
Zak James
Applications and Software Development
DM Solutions Group Inc.
http://www.dmsolutions.ca



More information about the Maplab-users mailing list