[Mapserver-users] shp2mysql.pl and LINE data.

Attila Csipa bear at prometheus.org.yu
Tue Aug 19 01:02:19 PDT 2003


On Monday 18 August 2003 17:01, Bruce Bushby wrote:
> point and polygon layers, however it ignores "line" layers, ie: roads.
>                if ($shape->{Shapetype} eq LINE){
> .any ideas?

As suggested, you should change that line to 

 if ($shape->{Shapetype} eq LINE or $shape->{Shapetype} eq ARC){

I have already changed it in the CVS version .

> Is there a php script to import ESRI shape files into mysql?

None that I know of, and the perl code is not easy to transfer to php since it 
uses perl libraries unavailable in php. It could be done theoretically by 
using mapserver to load the shapefiles and then query them and write them out 
one by one as it is done in the perl script, but that's not at elegant 
solution at all.





More information about the MapServer-users mailing list