New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--spatialite
fails if features have no properties
#30
Comments
--spatialite
fails if rows have no properties--spatialite
fails if features have no properties
Here's why: geojson-to-sqlite/geojson_to_sqlite/utils.py Lines 70 to 75 in 17c2d09
Since |
Really hard to know what to do about this one - the GeoJSON object here really is just a geometry with nothing else. There's not even an ID that can be used as a primary key. So we really want to create a SQLite table with just a |
https://stackoverflow.com/a/36926664/6083 suggests using this:
That makes me a little bit nervous, see https://www.sqlite.org/withoutrowid.html - it's not clear to me if this kind of "fake" rowid table will cause weird problems in the future, especially if I start using tricks like this one: https://til.simonwillison.net/sqlite/track-timestamped-changes-to-a-table I'm tempted to create a |
I think the safest thing to do here would be to create the table with a |
Fixed it! Here's that GeoJSON imported and rendered using https://datasette.io/plugins/datasette-geojson-map |
I think I spotted a bug: geojson-to-sqlite/geojson_to_sqlite/utils.py Lines 70 to 77 in 23bdb74
|
https://raw.githubusercontent.com/datanews/amtrak-geojson/master/amtrak-combined.geojson
Has a feature like this:
This fails with an error if you use the
--spatialite
option:The text was updated successfully, but these errors were encountered: