Opened 12 years ago

Closed 12 years ago

Last modified 8 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 12 years ago.
Pgeo file that contains type 51

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by fare

Attachment: testDB.zip added

Pgeo file that contains type 51

comment:1 Changed 12 years ago by chaitanya

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 Changed 12 years ago by chaitanya

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 Changed 12 years ago by fare

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 in reply to:  3 Changed 12 years ago by chaitanya

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 Changed 12 years ago by chaitanya

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 Changed 8 years ago by Even Rouault

Milestone: 1.6.4

Milestone 1.6.4 deleted

Note: See TracTickets for help on using tickets.