Changes between Version 35 and Version 36 of rfc61_support_for_measured_geometries
- Timestamp:
- Feb 3, 2016, 5:23:47 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
rfc61_support_for_measured_geometries
v35 v36 25 25 New OGRwkbGeometryType values are needed. SFSQL 1.2 and ISO SQL/MM Part 3 will be used, i.e., 2D type + 2000 for M and 2D type + 3000 for ZM. (Also types such as Tin and !PolyhedralSurface types can be added for completeness, even if unimplemented currently) 26 26 27 On a more general note, there could be a path to using a clean set of values and have legacy support as an exception. I'm proposing to define aliases for legacy *25D values to have a uniform set of values. Are there any problems with that?27 On a more general note, there could (should?) be a path to using a clean set of values and have legacy support as an exception. 28 28 29 29 Abstract types are defined and not part of the enum. … … 67 67 wkbTINZM = 3016, /**< ISO SQL/MM Part 3. GDAL >= 2.1 */ 68 68 69 // define aliases70 #define wkbPointZ wkbPoint25D71 ...72 69 73 70 // define new abstract types (why? what's the difference to the enum values? - at least they do not need to be handled in switches) … … 79 76 #define wkbSurfaceZM ((OGRwkbGeometryType)3014) /**< ISO SQL/MM Part 3. GDAL >= 2.1 */ 80 77 78 // add tests for M 79 #define wkbHasM(x) OGR_GT_HasM(x) 80 #define wkbSetM(x) OGR_GT_SetM(x) 81 82 OGRwkbGeometryType CPL_DLL OGR_GT_SetM( OGRwkbGeometryType eType ); 83 int CPL_DLL OGR_GT_HasM( OGRwkbGeometryType eType ); 84 85 81 86 }}} 82 87 … … 88 93 #define OGR_G_3D 0x2 89 94 #define OGR_G_MEASURED 0x4 90 }}} 95 #define OGR_G_IGNORE_MEASURED 0x8 96 }}} 97 The "ignore" flag is needed internally for backwards compatibility. 91 98 92 99 Currently a hack to set nCoordDimension negative is used to denote an empty point. … … 126 133 OGRBoolean IsMeasured(); 127 134 128 //Add methods (non-standard , may cause internal changes, e.g., allocate memory for Z or M values; note the use of one method instead of second unset* method):135 //Add methods (non-standard; note the use of one method instead of second unset* method): 129 136 virtual void set3D(OGRBoolean bIs3D); 130 137 virtual void setMeasured(OGRBoolean bIsMeasured); 138 int getFlags() const; 139 int setFlags( int newFlags ) const; 131 140 132 141 //Add now or later methods: … … 143 152 Add property double m to class OGRPoint. Add constructor, getters, and setters for it. 144 153 145 Add property double *padfM to class OGRSimpleCurve. Add constructor, getters, and setters for it. New setters with postfix M are needed for XYM data since the object may be upgraded to XYZ from XY in setters. 154 Add property double *padfM to class OGRSimpleCurve. Add constructor, getters, and setters for it. New setters with postfix M are needed for XYM data since the object may be upgraded to XYZ from XY in setters. Add also methods RemoveM() and AddM() with similar semantics as Make3D and Make2D. 146 155 147 156 Override methods set3D and setMeasured in those classes where setCoordinateDimension is overridden. … … 203 212 double* padfM); 204 213 }}} 214 Use of padfM requires changes to openfilegdb driver. 205 215 206 216 === GEOS, filters, and other issues === … … 213 223 214 224 The new C API functions need to be exposed through swig. Further changes depend on whether the language bindings are aware of coordinates. At least Python and Perl are. 225 226 The new geometry types will be included into the i files. 227 228 Some new setters and getters are needed for M. Is3D, IsMeasured, Set3D and SetMeasured methods should be added. Also OGR_GT_HasM. 215 229 216 230 == Drivers ==