Ticket #3310 (new bug)
DrawFeature control in freehand mode produces invalid geometries
| Reported by: | rayd | Owned by: | tschaub |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.13 Release |
| Component: | Handler.Path | Version: | SVN |
| Keywords: | geometry | Cc: | rayd |
| State: | Needs Discussion |
Description
To test this out I used the the draw feature example here: http://dev.openlayers.org/releases/OpenLayers-2.10/examples/draw-feature.html
Use a DrawFeature control in freehand mode with a Path handler to draw a line. Instead of dragging the mouse, just click once -- you will get a feature with a LINESTRING geometry with only one point. You can use a tool like Firebug to inspect the created features. Similarly, use a DrawFeature control in freehand mode with a Polygon handler. Just click once on the map, and you will get a feature with a POLYGON geometry with a LinearRing geometry with only two points. This shouldn't happen since those are technically invalid geometries.
I would think in this situation we're just better off not adding the feature to the layer in the first place.

