Hello all

Before to make proposal for the Shapefile reader, I would like to make some for the DefaultFeature class [1]. This class will be central to many future SIS developments. I would like to make it closer to ISO 19109, GML 3.2 and GeoAPI interfaces (while we will not implement GeoAPI right now).

A Feature is basically a map of (key, value) pairs where the key are names and values can be any object. Compared to the current DefaultFeature interface, I propose the following changes:

* Replace the getRecord() and setRecord() methods by:
   * getAttributeValue(String) : Object
   * setAttributeValue(String, Object)
* Remove the getGeom() and setGeom() methods, which would be an attribute like any other.

The reason for the later is that some kind of features may have no geometry, or more than one geometry with different name.

The reason for the former is that the map type may not be Map<String, String>. It may be something like Map<Name, Value> or Collection<Property>, to be determined in a future version. But no matter the approach selected later, it would probably be possible the get/setAttributeValue(String, ...) methods as convenient methods.

What do peoples thinks?

    Martin

[1] https://builds.apache.org/job/sis-jdk7/site/apidocs/org/apache/sis/feature/DefaultFeature.html

Reply via email to