#3100 closed defect (fixed)
Type 51 of geometry in Personal Geodatabase/shape
Reported by: | fare | Owned by: | chaitanya |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OGR_SF | Version: | 1.6.1 |
Severity: | normal | Keywords: | PGEO |
Cc: |
Description
Similar like in tickets #1484 and #2643 reported nShapeType = 50 here is report of nShapeType = 51. It seems that this type is simply polygon.
Supplied pgeo has two object (1'st is type 51 and second regular polygon type).
If you try to convert supplied pgeo to mapinfo tab you will get empty geometry for objectid=1. If you convert to shape again you get empty geometry for objectid=1 and will you will get objectid=2 geometry converted to polyline(incorrectly).
Adding this code after existing code that handles assigning type 50 to line to function createFromShapeBin in ogrpgeolayer.cpp seems to solve problem
if( nSHPType == 51 ) nSHPType = SHPT_POLYGON;
Now both mi tab and shape contains two polygons.
Attachments (1)
Change History (7)
by , 15 years ago
Attachment: | testDB.zip added |
---|
comment:1 by , 14 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
fare,
It says at http://resources.esri.com/help/9.3/ArcGISDesktop/ArcObjects/esriGeometry/esriShapeType.htm that esriShapeGeneralPolygon type can have non-linear segments and vertex identifier (ID) attributes. It may break the application if the data contains any attributes.
Can you point to a reference to the format specification? I couldn't find any.
comment:2 by , 14 years ago
Milestone: | → 1.6.4 |
---|
fare,
I read http://trac.osgeo.org/gdal/ticket/2643#comment:2
If I find the polygons in your sample data to be sane, I will go ahead and apply your fix.
Please inform me if you find any anomalies in the whole data.
follow-up: 4 comment:3 by , 14 years ago
chaitanya,
I looked in official white paper for Shape and didn't find any reference. As you can see these types shouldn't be in shape file.
"The ...General... types listed below are currently not public and not supported in shapefiles."
But somehow it ended in shape file.
After I changed code and run conversion I didn't find any anomalies in data(sample data are from bigger set where are several polygons with this type)
comment:4 by , 14 years ago
Replying to fare:
After I changed code and run conversion I didn't find any anomalies in data(sample data are from bigger set where are several polygons with this type)
That is because the code treats the type 51 as esriShapePolygon and discards any attributes corresponding to type 51.
I am also going to see if this holds works for types 52(1), 53(8) & 54(32) if I can find any sample data.
comment:5 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Pgeo file that contains type 51