== Feature Layers == Internal Features can be displayed on the Map. These features can be Points, Lines or Polygons (hence we need to use the OL Vector Features, not plain Features). Features can be added to the Map, removed from the map or moved on the map interactively. To do this via a single set of Controls means having a single Features Layer. This layer can be built up out of multiple Feature Groups. In order to be able to dynamically enable/disable individual Feature Groups whilst viewing the map, we need to write a custom layer switcher which refreshes the whole Features Layer upon changes. We need to use the Cluster Strategy to have nearby features aggregate at low zoom levels (& prevent performance issues) == Feature Classes == Feature Classes can (optionally) define the Marker used to render a Feature. These also provide the information for the popup when a Marker is selected. - this can contain fields from the original tables &/or an Edit button to enable editing those details. == Feature Groups == A Feature Group can be a Feature Class (e.g. 'Shelters' or 'Organisations') or can be a custom query. (These same Feature Groups can also be used to publish data as GeoRSS or KML or download as GPX or KML) Feature Groups to Features requires a Many-to-Many table: * http://groups.google.com/group/web2py/browse_thread/thread/70273ee7ba826a59 * http://groups.google.com/group/web2py/browse_thread/thread/582863bdd056bd7b == Markers == The Marker used for the Features will be: * The Feature marker (if defined) <- to be added later, if desired. * The Feature Class marker (if defined) * The Default marker We should provide an option to allow the Feature-Class icon to over-ride individual Feature Icons. [wiki:BluePrintGISMarkers Markers BluePrint] Q: Provide option to add Labels to Features? * http://gis.ibbeck.de/ginfo/apps/OLExamples/OL26/examples/labels.html == Storage == For portability, the default storage for Features is the normal database via Web2Py's [http://mdp.cti.depaul.edu/examples/default/orm DAL]. In order to support Lines & Polygons we need to store as [http://en.wikipedia.org/wiki/Well-known_text WKT] * UI for Points can hide this behind simple Lat/Lon * Q: Which lib best for this? * WorldMill: http://trac.gispython.org/lab/wiki/WorldMill * wraps OGR: http://www.gdal.org/ogr/osr_tutorial.html * Shapely: http://trac.gispython.org/lab/wiki/Shapely * wraps Geos: http://trac.osgeo.org/geos/ An options should be provided to store in [http://postgis.refractions.net PostGIS] instead, where available, as then can have spatial indexes for speed.[[BR]] Q: Could we extend DAL for spatial indexes? * [http://groups.google.com/group/web2py/browse_thread/thread/7551b50ef3ca72a8 DAL can be bypassed] to allow other ORMs to be used: {{{response.custom_commit=lambda: do_commit()}}} Q: integrate [http://featureserver.org FeatureServer]? ---- == Docs == * http://dev.openlayers.org/docs/files/OpenLayers/Feature/Vector-js.html * http://dev.openlayers.org/docs/files/OpenLayers/Layer/Vector-js.html == Examples == * Use HTTP to pull down Features List as XML: http://openlayers.org/dev/examples/behavior-fixed-http-gml.html * Controls to Add/Drag Features: http://openlayers.org/dev/examples/drag-feature.html * Select Feature (inc via Box): http://www.openlayers.org/dev/examples/select-feature.html * Popup on Feature: http://www.openlayers.org/dev/examples/select-feature-openpopup.html * Style Features: http://www.openlayers.org/dev/examples/styles-context.html , http://www.openlayers.org/dev/examples/styles-unique.html , http://www.openlayers.org/dev/examples/sundials.html * Download/Upload serialized feature data: http://www.openlayers.org/dev/examples/vector-formats.html * Cluster Strategy: http://www.openlayers.org/dev/examples/strategy-cluster.html === Limitations === * http://faq.openlayers.org/vector-related-questions/ ---- [wiki:BluePrintGeographicInformationSystems GIS BluePrints]