Cannot get geometry object from data you send to the GEOMETRY field

Attempting to export and import one of the databases for my omeka 2.6.1 instance. I am currently running mysql 5.1 and trying to import the database into mysql 8.0. I get the following error when I attempt the import. It appears to be associated with the Neatline Plugin.

ERROR 1416 (22003) at line 703: Cannot get geometry object from data you send to the GEOMETRY field.

I also tried to import the mysql dump into mysql 5.7 and got the very same error message.
Is there a fix available for this?

From the Neatline developers: other users have run into this problem, and we do not currently have a solution. There is some issue between versions of MySQL, we are currently working to find fix.

If you could provide us with any additional information, it would be helpful - importing using a .sql file or .csv file? using phpMyAdmin? If you could share a row of data that is causing the error message, that could also be useful, along with any other relevant details to your MySQL setup.

Thank you,

This is happening with us as well with other customers. Most recently moving from a campus server running 5.5 to one of ours on 5.7, same error. This was a .sql file import through phpMyAdmin but fails on commandline as well. It’s always the neatline records table that it fails on due to the structure of how it’s storing that data. Are there other ways of exporting and importing neatline data that would be cleaner than a SQL dump?

There’s a bunch of ways that spatial data can be “invalid” and MySQL is pretty bad about reporting which one is actually happening in any given scenario.

One that’s pretty commonly reported would go along with this old Neatline issue (which I think has been at least partially fixed even though the issue is open): old MySQL versions allowed blank or “empty” geometry and new versions don’t. There was a change to Neatline that makes it more aggressively insert sentinel POINT(0 0) values instead of “blanks,” but this probably wasn’t done as a migration to old data, so older Neatline installations could still have some old blank values sitting in the database.

If you still have the data live on a pre-5.7 server, try selecting AsText(coverage) from the neatline_records table and see if you have any NULL or empty results. If so, replacing those with GeomFromText('POINT(0 0)') before dumping might be the necessary solution here.

1 Like