Opened 14 years ago
Closed 12 years ago
#3753 closed defect (fixed)
Multipolygon with holes from OCI to PostgreSQL becomes invalid
Reported by: | Niccolo | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OGR_SF | Version: | 1.6.3 |
Severity: | normal | Keywords: | OCI multipolygon holes |
Cc: | ilucena |
Description
I'm trying to import a table from Oracle to Postgres with ogr2ogr.
Some records seem perfectly valid in Oracle, but become not valid in Postgres ("Holes are nested" error).
One geometry in Oracle is a MULTIPOLYGON with (outer_ring, inner_ring, outer_ring, inner_ring). The same geometry in Postgres becomes a MULTIPOLYGON with (outer_ring, outer_ring, outer_ring, outer_ring).
I attach an ASCII dump of the Oracle geometry.
Attachments (3)
Change History (10)
by , 14 years ago
Attachment: | oracle_multipolygon.txt added |
---|
comment:1 by , 14 years ago
Cc: | added |
---|---|
Component: | default → OGR_SF |
Niccolo,
Can you run ogrinfo to see how OGR sees this geometry? I'm trying to determine if the problem is in the oracle driver or the postgres driver.
by , 14 years ago
Attachment: | ogrinfo_BASE_AREE_VERDI_346 added |
---|
Ogrinfo output of the problematic multipolygon
comment:2 by , 14 years ago
Hi Frank, thank you very much for your interest in this.
It seems that ogrinfo gets the wrong geometry too, i.e. a MULTIPOLYGON(ring, ring, ring, ring).
I attach the ogrinfo dump of the problematic record.
comment:3 by , 14 years ago
Cc: | added; removed |
---|---|
Keywords: | Postgres removed |
Owner: | changed from | to
Ivan,
Is this something you may have time to dig into?
comment:5 by , 14 years ago
Cc: | added; removed |
---|---|
Owner: | changed from | to
This issue will have to wait for someone with oracle experience/access to have time to dig into it. Thanks for reporting it.
by , 12 years ago
Attachment: | ogrocilayer.patch added |
---|
comment:6 by , 12 years ago
This error comes from a bad interpretation of inner ring (nEType = 2003). New polygon should be created only if we encounter a new outer ring (nEType = 1003). By replacing the condition (see patch), inner ring is now added to the current polygon.
This patch is relative to trunk, but it can be easily back ported
Nicolas
comment:7 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Patch applied on trunk, revision r24521
SDO_ELEM_INFO_ARRAY and SDO_ORDINATE_ARRAY of the Oracle geometry