GIS data seems to come in .shp (shape?) files, but it’s not like MySQL knows what to do with those. this MySQL forum post points to a PHP tool and Windows executable that promise to convert the .shp data into something more useful to MySQL.
Superfluo explains a little more, and there’s lots of .shp data [...]
Posted June 17, 2008 by Casey Bisson
Categories: Dispatches. Tags: .shp, file conversion, geodata, mysql, shp2mysql, shp2mysql-php, spatial data. 2 Comments.
MySQL offers ENVELOPE() to find the minimum bounding rectangle of a geometric object.
The result is a polygon with four segments, defined by five points. It took me a while to make sense of it, partially because the only documentation that I’ve run across so far for POLYGON() syntax is in the ENVELOPE() function mentioned above. [...]
Posted June 13, 2008 by Casey Bisson
Categories: Technology. Tags: geolocation, MBR, minimum bounding rectangle, mysql, MySQL spatial functions, spatial data, spatial functions. One Comment.
It’s MySQL spatial data week here, though I am spreading out the posts to, um, ease the pain (or boredom). Anyway, here are some commands/functions I don’t want to forget about later:
Start with an existing table called geometry, add a spatial column and index it:
ALTER TABLE GEOMETRY ADD coord POINT NOT NULL;
CREATE SPATIAL INDEX coord [...]
Posted June 12, 2008 by Casey Bisson
Categories: Technology. Tags: geolocation, mysql, MySQL spatial functions, spatial data, spatial functions. One Comment.