Opened 14 years ago

Closed 14 years ago

#3260 closed defect (duplicate)

like in ticket #2643 where shape type 50 PGeodatabases are not recognized, 51 seems to be the same issue

Reported by: jesper247 Owned by: chaitanya
Priority: normal Milestone: 1.7.0
Component: OGR_SF Version: 1.6.2
Severity: normal Keywords: PGeo
Cc: warmerdam

Description

When reading an ESRI Personal geodatabase, the sometimes a shapetype 51 appears.

by using the same approach as in #2643 for determining what type of geometry this is, it turned out to be the same beast: A polygon with CircularArc-segments mixed with Line segments.

<RingArray xsi:type="esri:ArrayOfRing">
 <Ring xsi:type="esri:Ring">
 <SegmentArray xsi:type="esri:ArrayOfSegment">
 <Segment xsi:type="esri:Line">
 <FromPoint xsi:type="esri:PointN">
  <X>2754081.67923976</X> 
  <Y>127489.030517839</Y> 
  </FromPoint>
 <ToPoint xsi:type="esri:PointN">
  <X>2754228.96143305</X> 
  <Y>127489.052789288</Y> 
  </ToPoint>
  </Segment>
 <Segment xsi:type="esri:Line">
 <FromPoint xsi:type="esri:PointN">
  <X>2754228.96143305</X> 
  <Y>127489.052789288</Y> 
  </FromPoint>
 <ToPoint xsi:type="esri:PointN">
  <X>2754229.17293284</X> 
  <Y>127328.719448313</Y> 
  </ToPoint>
  </Segment>
 <Segment xsi:type="esri:Line">
 <FromPoint xsi:type="esri:PointN">
  <X>2754229.17293284</X> 
  <Y>127328.719448313</Y> 
  </FromPoint>
 <ToPoint xsi:type="esri:PointN">
  <X>2754128.54136811</X> 
  <Y>127331.741810211</Y> 
  </ToPoint>
  </Segment>
 <Segment xsi:type="esri:CircularArc">
 <FromPoint xsi:type="esri:PointN">
  <X>2754128.54136811</X> 
  <Y>127331.741810211</Y> 
  </FromPoint>
 <ToPoint xsi:type="esri:PointN">
  <X>2754086.20832042</X> 
  <Y>127378.371509929</Y> 
  </ToPoint>
 <CenterPoint xsi:type="esri:PointN">
  <X>2754135.88396938</X> 
  <Y>127380.938837321</Y> 
  </CenterPoint>
  <IsCounterClockwise>false</IsCounterClockwise> 
  <IsMinor>false</IsMinor> 
  <IsLine>false</IsLine> 
  </Segment>
 <Segment xsi:type="esri:CircularArc">
 <FromPoint xsi:type="esri:PointN">
  <X>2754086.20832042</X> 
  <Y>127378.371509929</Y> 
  </FromPoint>
 <ToPoint xsi:type="esri:PointN">
  <X>2754086.16464627</X> 
  <Y>127379.438170144</Y> 
  </ToPoint>
 <CenterPoint xsi:type="esri:PointN">
  <X>2754135.8839253</X> 
  <Y>127380.93969012</Y> 
  </CenterPoint>
  <IsCounterClockwise>false</IsCounterClockwise> 
  <IsMinor>false</IsMinor> 
  <IsLine>false</IsLine> 
  </Segment>
 <Segment xsi:type="esri:Line">
 <FromPoint xsi:type="esri:PointN">
  <X>2754086.16464627</X> 
  <Y>127379.438170144</Y> 
  </FromPoint>
 <ToPoint xsi:type="esri:PointN">
  <X>2754081.67923976</X> 
  <Y>127489.030517839</Y> 
  </ToPoint>
  </Segment>
  </SegmentArray>
  </Ring>
  </RingArray>

I have for now fixed it on my own version as you have done with #2643: By adding a check for type 51, and then changing the type to a simple polygon:

/* -------------------------------------------------------------------- */
/*      type 50 appears to just be an alias for normal line             */
/*      strings. (#1484)                                                */
/* -------------------------------------------------------------------- */
    if( nSHPType == 50 )
        nSHPType = SHPT_ARC;

/* -------------------------------------------------------------------- */
/*      type 51 appears to just be an alias for polygon             */
/* -------------------------------------------------------------------- */

	if( nSHPType == 51 )
        nSHPType = SHPT_POLYGON;

The format and content of the complete XML-file is the same as in #2643 so i did not attach the exported XML and shape-files

regards Jesper

Change History (2)

comment:1 by warmerdam, 14 years ago

Cc: warmerdam added
Keywords: unknown type 51 #2643 removed
Milestone: 1.7.0
Owner: changed from warmerdam to chaitanya

Chaitanya,

Can you review this in light of your other pgeo work and see if there are additional issues still to fix? Perhaps this is already addressed?

comment:2 by chaitanya, 14 years ago

Resolution: duplicate
Status: newclosed

Duplicate ticket. Already fixed in #3100.

Note: See TracTickets for help on using tickets.