kbranigan / shapefile_converter

this script takes a shapefile (*.shp, *.dbf) and creates a (*.sql)
14 stars 5 forks source link

Import straight to MySQL geometry #2

Open grgcombs opened 13 years ago

grgcombs commented 13 years ago

Any thoughts on importing straight to MySQL's geometry classes? After I used your converter to put shapefiles in a MySQL db, I've since been churning the resulting rows to incorporate MySQL's geometry, like Points, LineStrings, and Polygons (some with "holes"). This is an incredibly slow process, given that I'm dealing with roughly 9 million rows of points and a bunch of fragile stored procedures/functions.

Then it dawned on me that it might not be too difficult to do rewrite your conversion app to handle this process at the point of insertion, either coinciding or in lieu of the textual representations. Before I embarked on it, I thought I'd see if you had any thoughts on the matter.

kbranigan commented 13 years ago

I haven't personally considered it, but I doubt it'd be much work - It's just slightly adjusting the SQL output. To be honest, I've been putting most of my efforts into my pipes project so I haven't really touched this.

Were you thinking simply different SQL or having the app do the inserts itself?