Hello Travis
Thanks for the feedback.
Le 25/02/14 03:44, Travis L Pinney a écrit :
Would it be good to create another class that has more constraints so
it would be easier to serialize or convert? I still think it is good
to have a DefaultFeature class that would be able to represent a row
from a table like "features"
I think that a DefaultFeature which handles geometries like an ordinary
property is close to a row in a PostGIS table. For a constrained
subclass, I wonder if we can find a set of constraints common enough. I
mean, I think that the constraints depend on the target store. Json may
have different constraints than PostGIS which has different constraints
than Shapefile, etc. An alternative found in some other libraries (e.g.
javax.imageio.ImageWriter) is to provide a 'canEncode' method, which
tell us whether the given feature meets the constraints of a given data
store.
It is possible that experience tell us which constraints are found in a
majority of today's data stores, in which case I agree that a
constrained subclass would be useful.
Martin