Opened 13 years ago
Closed 13 years ago
#3995 closed defect (fixed)
Nested holes when using ogr2ogr mid-mif -> postgis
Reported by: | poulet1212 | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OGR_SF | Version: | 1.7.2 |
Severity: | normal | Keywords: | nested holes postgis mid mif |
Cc: | Daniel Morissette, aboudreault |
Description (last modified by )
When using ogr2ogr tool to convert multipolygons having nested holes from mid-mif to postgis, the resulting postgis table does not contain nested hole. In fact, these holes exists but they are "filled" with a polygon.
Ive seen a post about it there: http://medspx.homelinux.org/blog/Qgis/postgis_nested_holes.html (sorry its in french)
The weird is that if I convert a SHAPE dataset that contains nested holes to postgis, these are converted correctly.
-Ignore the first file. The zip files contain vegetal coverage polygons, it contains nested holes that are buildings.
The cammand I used is like:
ogr2ogr -progress -a_srs EPSG:21781 -f PostgreSQL PG:"dbname=postgis host=localhost port=5432 user=postgres password=postgis" -nln mid-mif-exported-table C:\temp\MOVD_CAD_TPR_CSVERT_S.mif MOVD_CAD_TPR_CSVERT_S
I can attach the mid/mif and shp files I used.
Attachments (3)
Change History (8)
by , 13 years ago
Attachment: | MOVD_CAD_TPR_CSVERT_S.mid added |
---|
by , 13 years ago
Attachment: | MifMidOutput.zip added |
---|
by , 13 years ago
Attachment: | cadastral_shp.zip added |
---|
comment:1 by , 13 years ago
Description: | modified (diff) |
---|
comment:2 by , 13 years ago
Cc: | added |
---|---|
Component: | Utilities → OGR_SF |
comment:3 by , 13 years ago
Ok. Do you have a sample mid/mif dataset with nested holes that I can check if they appear correctly once transformed in postgis?
comment:4 by , 13 years ago
I see the version is set to 1.7.2 in the ticket. Could this be something that was fixed in 1.8.0? That would explain why rouault sees the inner rings and poulet1212 doesn't.
I know we've added calls to OGRGeometryFactory::organizePolygons for mif features at some point, but I'm not sure to which GDAL/OGR version that corresponds.
comment:5 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Ok, I've tried with the latest 1.8 build and now the inner rings appear correctly when transforming mid/mif files to Postgis. So it is something that has been fixed in 1.8 and still I use 1.7 I did not see it. However I'm gonna move to this version and also follow the new ones :-)
Thanks a lot for your comments.
Not sure if this is really an issue with the MIF/MID driver or with the data file. When doing a ogrinfo on it, I can see inner rings being reported for some polygons.