views:

303

answers:

2

I am trying to find this shp2mysql tool. But all I found was a PHP implementation. There is any other version available in the internet?

A: 

I'm not sure you would want to insert files into a database, but if you had to, I don't see why you can't use MySQL's BINARY or BLOB data type (I can't recall if a .shp file is binary or text). Just read in the file using [insert your favorite language] and construct the appropriate MySQL query statement to add it to the database - it's pretty easy, almost trivial.

A better solution would be to store the file in your file system and record a path to it in your database, allowing you to open the file and read it when needed.

Thomas Owens
+1  A: 

I found a solution for download. (Windows version)

The readme says it needs Cygwin, but I just executed it and it worked.

Jader Dias