Opened 15 years ago

Closed 14 years ago

Last modified 11 years ago

#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)

testDB.zip (28.7 KB ) - added by fare 15 years ago.
Pgeo file that contains type 51

Download all attachments as: .zip

Change History (7)

by fare, 15 years ago

Attachment: testDB.zip added

Pgeo file that contains type 51

comment:1 by chaitanya, 14 years ago

Owner: changed from warmerdam to chaitanya
Status: newassigned

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 chaitanya, 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.

comment:3 by fare, 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)

in reply to:  3 comment:4 by chaitanya, 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 chaitanya, 14 years ago

Resolution: fixed
Status: assignedclosed

Applied the patch in the 1.6 branch(r18132) and the trunk(r18133).

I couldn't find any sample data for 52, 53 & 54 and didn't test them.

comment:6 by Even Rouault, 11 years ago

Milestone: 1.6.4

Milestone 1.6.4 deleted

Note: See TracTickets for help on using tickets.