Adrian Custer ha scritto:
> Hey all,
>
> Making Features is a mess in 2.2.x ; I'd like to resolve this.
>
>
> >From the Javadocs, both GeoAPI and Geotools appear to provide approaches
> to building Features but both are problematic. 
>
>         1) Does the GeoAPI approach even work?
>         This approach uses AttributeDescriptors, are these
>         new/functional?
>           FeatureTypeFactory.createAttributeDescriptor()
>           FeatureTypeFactory.createFeatureType()
>           FeatureType.createFeature()
>           ==> results in a org.opengis.feature.Feature, how does this
>         relate to a Geotools Feature?
>   
Well, I've not been involved in geotools for quite a bit of time, so I'm 
answering by code inspection,
but then again, asking Eclipse for classes implementing the opengis 
Feature interface, you'll get
a nicely empty result.
So, apparently geotools still haven't embraced the OpenGis Feature 
interfaces.
>         
>         2) Does the Geotools approach actually work?
>         The approach seems to have two branches, via FeatureTypeFactory
>         or via FeatureTypeBuilder but neither seems complete.
>         
>           AttributeTypeFactory.newAttributeType()
>           FeatureTypeFactory.newFeatureType(AttribType [], "name")
>           ==> FeatureTypeFactory is deprecated
>           FeatureType.create(Object [])
>         ==> this works but uses a deprecated class
>         
>   
Looking in some datastores you'll see that this approach is used, but 
the FeatureTypes class is
used in place of FeatureTypeFactory.
>         
>           AttributeTypeFactory.newAttributeType()
>           ==> can't do: new FeatureTypeBuilder() despite the javadocs.
>           FeatureTypeBuilder.getFeatureType()
>           FeatureType.create()
>
>
> Could someone in the know explain these different paths to me so that I
> could document the situation now and as it evolves.
The situation is in fact build embarassing. I'm looking on trunk now, 
there are lots of deprecated
classes and lots of uses of these still around.
We should establish a rule that any deprecation should be followed by a 
replacement and by
the removal of all usages of deprecated code from geotools.

Anyway, I think the FM branch is going to radically change the 
factory/builder approaches (in
a saner way?). Jody and Justin for sure know more.

Cheers
Andrea

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to