Opened 14 years ago

Closed 14 years ago

#594 closed defect (fixed)

SHP can't handle Z and M value in the same time.

Reported by: leaf Owned by: gregboone
Priority: major Milestone: 3.5.0
Component: SHP Provider Version: 3.4.0
Severity: 3 Keywords:
Cc: External ID: 1270270

Description

  1. Create a shp file and set geometry to point, haselevation to true and hasmeasure to true.
  1. Close connection to this shp file and reconnect to it.
  1. Describe schema.

Result: Geometry's hasmeasure property value is false.

Attachments (2)

1270270.patch (1.7 KB ) - added by leaf 14 years ago.
Ticket594.patch (1.2 KB ) - added by leaf 14 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by leaf, 14 years ago

Component: FDO APISHP Provider

by leaf, 14 years ago

Attachment: 1270270.patch added

comment:2 by leaf, 14 years ago

http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf

According to SHP specification, Mmin and Mmax is equal to 0.0, if not Measured type. If the shapefile is empty (that is, has no records), the values for Xmin, Ymin, Xmax, and Ymax are unspecified. Mmin and Mmax can contain "no data" values for shapefiles of measured shape types that contain no measures.

However, SHP provider always uses "no data" no matter shp file contrains measured shape types.

by leaf, 14 years ago

Attachment: Ticket594.patch added

comment:3 by leaf, 14 years ago

The previous submission doesn't fix this defect compeletely. After inserting a new feature without m value, FDO provider will still update values of Mmin and Mmax and it will use "no data" value to override the original value 0.0. It result in geometry value of a geometry property without measure contains m value. So the fix is to check whether the m value of newly added geometry is "no data" value. If yes, don't update values of Mmin and Mmax.

comment:4 by gregboone, 14 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.