I've been trying to import a POINTS based shapefile into Geospatial Data in Geo Module. I've tried using MySQL and PostgreSQL with PostGIS and have successfully imported POLYGON shapefiles with no problems. I've downloaded shapefiles from Census and have created shapefiles from scratch and I run into the same error.
user warning: Cannot get geometry object from data you send to the GEOMETRY field query: INSERT INTO geo_data_foopoint (statefp, countyfp, countyns, pointid, fullname, mtfcc) VALUES ('foo', 'foo', 'foo', 'foo', 'foo', 'foo') in /htdocs/drupal6/includes/common.inc on line 3477.
Could someone post a point shapefile that works on their system? I'm fairly sure I'm just doing something wrong. Thanks!
Comments
Comment #1
spelcheck commentedI just upgraded to latest dev and getting different messages now.
"Call to undefined geo operation schema_field" and immediately after that,
I'll keep digging, but please reply if anyone has a hint.
Comment #2
travismiller commentedI had this same issue with a POINTS shapefile. 6.x-1.0-alpha5
I traced back to shp2sql.inc:geo_shp2sql:
$shp['data'] is a string "POINT(#.### #.###)" instead of an array with 'wkt'.
I patched by testing if it was a string and treating it as such.
I haven't traced back any further than this. My imports worked after this change. HTH