Ticket #2374 (assigned defect)

Opened 2 months ago

Last modified 2 months ago

OGR : Shapefile driver : Possible bug in Coordinate Dimension

Reported by: nbo Assigned to: warmerdam (accepted)
Priority: normal Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords: shape
Cc:

Description

Hello, I have been checking the source code of the OGR shapefile driver.There is a problem with Measures types (Version 1.51). For example, a PointM and a PointZ are considered as 3 dimensions (OGRPoint is initialized with X,Y,Z on both cases,the problem is that PointM has no Z information).Point is considered as 2 dimensions. If we follow the simple feature architecture,Point & PointM are 2 dimensions and Point Z 3.

Change History

05/15/08 14:21:50 changed by nbo

Forgot to say that this is the same for Lines,polygons....

05/15/08 15:28:47 changed by warmerdam

  • keywords set to shape.
  • status changed from new to assigned.
  • component changed from default to OGR_SF.

First, OGR is based on Simple Features 1.0, so it doesn't properly handle measures. Instead the shapefile driver (may) just wedge it into the Z and threat it as 3 dimensional. If that is the situation, I don't plan to make any changes till we upgrade to Simple Features 1.2 as our base model.

If you have a PointM file where the M is discarded but the dimension is still set to 3 then that might be something I could look into.

05/15/08 15:45:58 changed by nbo

just a remark,for example : PointM shapefiles (no Z coordinate): - The Z coordinate is put into OGRPoint (Z is,in that case always 0.00).

If we want to seek the Simple Features 1.0 spec,we should coords dimensions at 2 for Point and PointM.... Anyway,I have modified the driver in order to support Mesures with an overloaded class.

05/15/08 15:47:20 changed by nbo

Ex : OGRPointM,derived from OGRPoint => Using RTTI

05/15/08 15:54:39 changed by nbo

I know that for the moment,OGR does not support Measures...