[Gdal-dev] OCI-geometry recognition
Frank Warmerdam
warmerdam at pobox.com
Wed Sep 27 09:57:31 EDT 2006
Stephan Holl wrote:
> Exporting this as WKT it says it is LINESTRING(x, y, z).
>
> So the mystery-value of 2147483650 seems strange. Is this a bug in OGR?
>
> Same applies to point and geometry layers:
> WKB for points: 2147483649
> WKB fr lines: 2147483650
> WKB for polygons: 2147483651
Stephan,
This is the list of enumerated values for geometry types in OGR:
typedef enum
{
wkbUnknown = 0, /* non-standard */
wkbPoint = 1, /* rest are standard WKB type codes */
wkbLineString = 2,
wkbPolygon = 3,
wkbMultiPoint = 4,
wkbMultiLineString = 5,
wkbMultiPolygon = 6,
wkbGeometryCollection = 7,
wkbNone = 100, /* non-standard, for pure attribute records */
wkbLinearRing = 101, /* non-standard, just for createGeometry() */
wkbPoint25D = 0x80000001, /* 2.5D extensions as per 99-402 */
wkbLineString25D = 0x80000002,
wkbPolygon25D = 0x80000003,
wkbMultiPoint25D = 0x80000004,
wkbMultiLineString25D = 0x80000005,
wkbMultiPolygon25D = 0x80000006,
wkbGeometryCollection25D = 0x80000007
} OGRwkbGeometryType;
So, what you are seeing is the 2.5D (x,y,z) forms of the geometries.
For applications that don't care to differentiate, I normally use the
wkbFlatten() macro on the values to reduce them to the simple 2D versions.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org
More information about the Gdal-dev
mailing list