Opened 15 years ago
Closed 14 years ago
#2991 closed defect (fixed)
OGR PGeo driver's GetGeometryRef() returns NULL for lines/polygons with Z coordinates
Reported by: | traianstanev | Owned by: | chaitanya |
---|---|---|---|
Priority: | normal | Milestone: | 1.6.3 |
Component: | OGR_SF | Version: | 1.6.0 |
Severity: | normal | Keywords: | PGEO |
Cc: | warmerdam |
Description
This defect is essentially the same as ticket #2692, but for polygons and lines with Z coordinates. The driver needs a special case to map shape geometry types 10 and 19 (PolylineZ and PolygonZ) in addition to 9 (PointZ). This is likely due to shape types being slightly different in SHP versus PGDB. Here is the list:
Value | Shape Type | GDB Type |
0 | Null Shape | Null Shape |
1 | Point | Point |
3 | PolyLine | PolyLine |
5 | Polygon | Polygon |
8 | MultiPoint | MultiPoint |
9 | n/a | PointZ |
10 | n/a | PolylineZ |
11 | PointZ | PointZM |
13 | PolyLineZ | PolyLineZM |
15 | PolygonZ | PolygonZM |
18 | MultiPointZ | MultiPointZM |
19 | n/a | PolygonZ |
20 | n/a | MultiPointZ |
21 | PointM | PointM |
23 | PolyLineM | PolyLineM |
25 | PolygonM | PolygonM |
28 | MultiPointM | MultiPointM |
31 | MultiPatch | MultiPatchM |
32 | n/a | MultiPatch |
Attachments (2)
Change History (11)
comment:1 by , 15 years ago
Cc: | added |
---|---|
Keywords: | PGEO added |
Milestone: | → 1.6.2 |
Owner: | changed from | to
comment:2 by , 15 years ago
I do have a data set with the two types I mention in the report. I don't have data for the other two types in the table (20 and 32). I will need to get approval before posting it here (it's customer data).
by , 15 years ago
Attachment: | PGeoTest.zip added |
---|
comment:3 by , 15 years ago
I have added a test file which demonstrates the problem. I was not allowed to share the original data, so this is a specially prepared file from the customer. It demonstrates PolygonZ and PolylineZ features -- OGR already has the fix for PointZ, as mentioned in my bug description.
comment:4 by , 15 years ago
I'm also attaching the fix I am temporarily using. I am not sure about some of the changes, but it does work for the geometry types in question. Admittedly, I didn't test it very thoroughly...
by , 15 years ago
Attachment: | pgeo_fix.zip added |
---|
comment:5 by , 15 years ago
Status: | new → assigned |
---|
Traian,
Can you give me a reference for the PGDB data types? There are some conflicts which need to be resolved before I can apply your patch.
comment:6 by , 15 years ago
comment:7 by , 15 years ago
Applied the patch in trunk (r17619) and 1.6 branch (r17620).
The patch worked fine with the data provided by Traian and was also able to identify some previously unidentified geometries in http://download.osgeo.org/gdal/data/pgeo/NHDH0104.tar.gz. I also tested it on some other data without any changes/problems.
It also gives a better fix for POINTZ shape type problem described in #2692. I removed the patch r15799.
Train,
Can I put up the test file PGeoTest.zip on the GDAL's sample data archive at http://download.osgeo.org/gdal/data?
comment:9 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Uploaded the test data at http://download.osgeo.org/gdal/data/pgeo/PGeoTest.zip
Chaitanya,
Please dig into this when practical. Traian - do you have sample data demonstrating some of the currently unhandled types?