[Tile-serving] [openstreetmap/osm2pgsql] Don't let invalid geometries into the database (#655)
Hartmut Holzgraefe
hartmut.holzgraefe at gmail.com
Thu Dec 1 09:17:16 UTC 2016
On 30.11.2016 22:17, Frederik Ramm wrote:
> This code block will attempt to create a buffer(0) around an empty
> geometry, and then throw an exception because the geometry is still empty.
not having empty geometries in the first placewould be great, as MySQL
spatial indexes have a NOT NULL requirement.
So far I've been trying to work around this by replacing NULL geometries
with an empty feature collection, this works with MariaDB, but MySQL
optimizes that away and still inserts a NULL geometry instead.
I so far didn't really dare to simply not perform an INSERT in such
cases at all, but it seems to be the right thing to do, and the higher
up in the stack the better?
--
hartmut
More information about the Tile-serving
mailing list