Invalid geometries after export/import
See original GitHub issueContext
The dataset with all geometries as valid generates, a different number of, invalid geometries when importing it depending on the export format.
Steps to Reproduce
- CSV.
- SHP.
- GeoPackage.
- Import all of them.
- Run the queries:
SELECT count(*) FROM chicago_census_tracts_csv where st_isvalidreason(the_geom) != 'Valid Geometry'
SELECT count(*) FROM chicago_census_tracts_shp where st_isvalidreason(the_geom) != 'Valid Geometry'
SELECT count(*) FROM chicago_census_tracts_gpkg where st_isvalidreason(the_geom) != 'Valid Geometry'
Current Result
Tables count for invalid geometries:
- chicago_census_tracts_csv: 0
- chicago_census_tracts_shp: 3
- chicago_census_tracts_gpkg: 36
Expected result
I would expect to have all geometries as valid, independently of the export format.
Additional info
Using QGIS Geometry Checker Plugin I wasn’t able to detect invalid geometries from step 2 files. However, I was able to detect invalid geometries after exporting again the imported gpkg dataset at step 3.
cc @javisantana
Issue Analytics
- State:
- Created 7 years ago
- Comments:53 (51 by maintainers)
Top Results From Across the Web
Handling Invalid Geometries (QGIS3) - QGIS Tutorials and Tips
When working with vector data layers, you may encounter geometry errors. These errors often become part of your data after running ...
Read more >Invalid Geometry - Slide2 Documentation - Rocscience
When importing geometry into Slide2, you are guided through a validation step. The geometry validation tool identifies 5 categories of possible problems: Near- ......
Read more >Error exporting data from a feature class to shapefile
It appears as though you have some invalid geometries within your Oracle ... in order to migrate the data or even export /...
Read more >CAD Data Import and Export Overview
IGES (Modeling: Import/Export > Import > 3D Files > IGES). Versions up to 5.3. This file format contains accurate descriptions of structure surfaces....
Read more >STL export/import loss of detail | Alibre Forum
I wanted to import a part geometry to ParaView, a data analysis and visualization application. But after import of STL file the geometry...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I ran the following regression tests as well:
.carto
file: OK2.1.2+svn.37167-precise1
: OKReady for production.
For the record, here’s a snippet showing how I got to debug our test case:
First, compile GDAL with debug symbols and open the resulting
ogr2ogr
withgdb
:Now we can set breakpoints as needed and execute the conversion of our test case: