Fwd: ogr extension

Bernhard Herzog bh at intevation.de
Mon Jan 31 21:04:19 CET 2005


Nina Hüffmeyer <nhueffme at intevation.de> writes:
> wkbUnknown means that ogr does not know the geometry type of the layer and 
> that features of any type of geometry are allowed to be added to the layer. 

In that case, ISTM that "wkbUnknown" would better be called "wkbAny" or
"wkbGeometry" or something like that.

> There are the following types known in ogr:
>
> wkbNone,

Which means what?

> wkbUnknown, wkbPoint, wkbLineString, wkbPolygon, wkbMultiPoint, 
> wkbMultiLineString, wkbMultiPolygon, wkbGeometryCollection

The multi-types are probably already handled by the rendering code.  If
some aren't it shouldn't be diffcult to add them.

wkbGeometryCollection and wkbUnknown are similar in a way.  Currently
thuban assumes that all shapes in a layer have the same concrete type,
e.g. all polygons or all arcs.  With wkbUnknown this can vary on a shape
by shape basis.  A wkbGeometryCollection is a collection of arbitrary
geometries but once we can handle wkbUnknown, handling
wkbGeometryCollection seems to require just one more loop.

Handling wkbUnknown requires that each shape knows its type, at least
for shapes returned from shape stores that have the wkbUnknown type.
The rendering code would need a low-level renderer for wkbUnknown that
looks up the real low-level renderer based on the type of each shape.
The same applies to other parts of the code that deal with the actual
geometries, such as the hit-testing code.  All this probably isn't very
difficult either.

   Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Skencil                                           http://skencil.org/
Thuban                                  http://thuban.intevation.org/




More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)