Closed (fixed)
Project:
Geo
Component:
Geo Data module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
12 Aug 2009 at 22:30 UTC
Updated:
7 Jan 2010 at 18:17 UTC
I am trying to import a shape file from MassGIS - the Massachusetts Senate Legislative Districts (see attached). All the fields import correctly except for the geo field, which is filled with a very long string of random characters. I get the error #1416 - Cannot get geometry object from data you send to the GEOMETRY field when trying to edit the row in phpMyAdmin.
The MassGIS system uses SRID 26986.
I am running php 5.2.9, Apache 2.2.11, Drupal 6.13, and MySQL 5.0.81-community.
Any ideas why the data won't import correctly?
| Comment | File | Size | Author |
|---|---|---|---|
| Senate.zip | 426.13 KB | tjhellmann |
Comments
Comment #1
allie mickaI think this is working as designed?
MySQL Spatial stores its data in a binary format. You can get the data out again by using one of the functions as described at http://dev.mysql.com/doc/refman/5.0/en/spatial-extensions.html .
I was able to import this table using the geo_data module at admin/build/geo , and I was able to use queries such as "SELECT AsText(geo) FROM geo_data_senate;" and "SELECT AsText(Centroid(geo)) FROM geo_data_senate;"
MySQL doesn't really do anything helpful with the SRID, and it doesn't support any transformations on projections. It's likely you want to convert this to Drupal's default SRID prior to importing it.
Thanks!
Comment #2
allie mickaI'm going to go ahead and close this for lack of feedback. I think things may have been working OK, but if not, please feel free to reopen!
Thanks!