Adrian Custer wrote:
> 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?
>   
No - there is no implementation. The GeoAPI mess is what is being fixed 
on the FM branch. And believe me it will make
use of a nice normal FeatureFactory - end of story, nice and clear etc...
>           ==> results in a org.opengis.feature.Feature, how does this
>         relate to a Geotools Feature?
>   
It does not, synchronization of both of these interfaces (actually 
replacement as both are not capable) is what FM does.
>         2) Does the Geotools approach actually work?
>   
It does - but poorly. the ONLY thing to do is use FeatureType.create( 
Object[] ) method ...
Confirmed as non deprecated on TRUNK and 2.2.x:
create(Object[])
create(Object[], String)

>         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
>   
Which class is deprecated? The deprecation was removed as far as I know 
(it was added when I thought the Feature Model was
straightened out for GeoTools 2.1, but I could not make sense of the 
alternative so the deprecation should of been removed).

>         
>         
>           AttributeTypeFactory.newAttributeType()
>           ==> can't do: new FeatureTypeBuilder() despite the javadocs.
>           FeatureTypeBuilder.getFeatureType()
>           FeatureType.create()
>         
>         3) Is there going to be yet another approach with the new
>         Feature Model?
>   
See above, the approach is direct use of Factory, no stupid hacking 
around etc...

jody


-------------------------------------------------------------------------
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