[Mapserver-users] problem with shp2mysql

Daniel Lagos dlagos at fdcconsult.com
Mon May 31 13:16:55 EDT 2004


This is a multi-part message in MIME format.

------=_NextPart_000_0517_01C44711.8B6BF220
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

I Read

http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?MySQL

I modified the shp2mysql because not found the modules:

the line:  "use Shape qw/:all/" to "use Geo::ShapeFile::Shape qw/:all/"

and line: "$shape =3D new Shape $ARGV[0]"  to "$shape =3D new =
Geo::ShapeFile::Shape $ARGV[0]" too

I run shp2mysql.pl

> shp2mysql.pl file_name

 and got the error:
    Odd number of elements in hash assignment at =
/usr/lib/perl5/site_perl/5.8.0/Geo/ShapeFile/Shape.pm line 30.

pliiiisssss...:) . I need help because don't understand PERL.

Thank you.

PD:I use mapserver4.0, RH9.0, Mysql 4.0, PHP 4.3.2

Daniel Lagos.
dlagos at fdcconsult.com

------=_NextPart_000_0517_01C44711.8B6BF220
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman" =
size=3D3><FONT=20
face=3DArial size=3D2>I Read</FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?MySQL">http://mapser=
ver.gis.umn.edu/cgi-bin/wiki.pl?MySQL</A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman" =
size=3D3><FONT=20
face=3DArial size=3D2>I&nbsp;modified the&nbsp;shp2mysql because =
not&nbsp;found the=20
modules:</FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman" =
size=3D3><FONT=20
face=3DArial size=3D2></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>the line: </FONT><FONT face=3DArial =
size=3D2><FONT=20
face=3D"Times New Roman" size=3D3><FONT face=3DArial =
size=3D2>&nbsp;"use</FONT> <FONT=20
face=3DArial size=3D2>Shape qw/:all/" to "use Geo::ShapeFile::Shape=20
qw/:all/"</FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>and line: </FONT><FONT face=3DArial =
size=3D2>"$shape =3D=20
new Shape $ARGV[0]"&nbsp; to "$shape =3D new Geo::ShapeFile::Shape =
$ARGV[0]"=20
too</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I run&nbsp;shp2mysql.pl</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&gt; =
shp2mysql.pl&nbsp;file_name</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;and got =
the&nbsp;error:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; Odd number of =
elements in hash=20
assignment at /usr/lib/perl5/site_perl/5.8.0/Geo/ShapeFile/Shape.pm line =

30.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>pliiiisssss...:) . I need=20
help&nbsp;because&nbsp;don't understand PERL.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thank you.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>PD:I use mapserver4.0, RH9.0, Mysql =
4.0, PHP=20
4.3.2</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Daniel Lagos.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"mailto:dlagos at fdcconsult.com">dlagos at fdcconsult.com</A></FONT></D=
IV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0517_01C44711.8B6BF220--




More information about the mapserver-users mailing list