Hi Lucas, If you have a FeatureTypeInfo, you can call FeatureTypeInfo.getFeatureType().getDefaultGeometry(). If that returns null then the feature type does not have a geometry.
-Justin On Thu, Sep 29, 2011 at 8:24 AM, Lucas Heezen - Covadis <[email protected]>wrote: > Hello,**** > > ** ** > > Today i started with building this filter. This is the first time I edit > the code for geoserver.**** > > I’ve found the class which return the available featureTypes. But how can I > check I the featureType has an attribute ‘Geometry’?**** > > ** ** > > This is what is have so far but it won’t build:**** > > ** ** > > AvailabelFeatureTypeResource.java**** > > ** ** > > FeatureTypeInfo ftinfo = catalog.getFeatureTypeByDataStore(info, > featureTypeName);**** > > if (ftinfo == null) {**** > > List<AttributeTypeInfo> attr = ftinfo.getAttributes(); > **** > > if (attr != null) {**** > > for (AttributeTypeInfo att : attr) {**** > > if (att.getBinding() != null) {**** > > if > (att.getBinding().getName().equals("com.vividsolutions.jts.geom.Geometry")) > {**** > > //not in catalog, add it**** > > available.add(featureTypeName);**** > > **** > > }**** > > }**** > > ** ** > > }**** > > }**** > > }**** > > ** ** > > ** ** > > Met vriendelijke groet, > Lucas Heezen**** > > [image: Beschrijving: http://www.covadis.nl/emailkop/logo.gif]**** > > Covadis b.v. **** > > t: 026 3616600 **** > > Geograaf 12 **** > > f: 026 3612317 **** > > 6921 EW Duiven **** > > e: [email protected]**** > > ** ** > > ** ** > > *Van:* Justin Deoliveira [mailto:[email protected]] > *Verzonden:* donderdag 25 augustus 2011 16:20 > *Aan:* Lucas Heezen - Covadis > *CC:* [email protected] > *Onderwerp:* Re: [Geoserver-users] Geoserver REST features.json?list=all** > ** > > ** ** > > Hi Lucas,**** > > ** ** > > There is currently no option to do to this. GeoServer doesn't really > consider them to be any different. However it could be a useful option to be > able to filter out geometryless ones though. Feel free to open an issue > request in the bug tracker or better yet submit a patch.**** > > ** ** > > -Justin**** > > ** ** > > On Thu, Aug 25, 2011 at 6:41 AM, Lucas Heezen - Covadis <[email protected]> > wrote:**** > > Hello, **** > > **** > > I’m using REST to get alle the available featuretypes from a datastore. > Geoserver returns all the available featuretypes including the ones with no > geometry or system tables (Oracle). How do I retrieve only the FeatureTypes > with a geometry type?**** > > **** > > **** > > Met vriendelijke groet, > Lucas Heezen**** > > [image: Beschrijving: http://www.covadis.nl/emailkop/logo.gif]**** > > Covadis b.v. **** > > t: 026 3616600 **** > > Geograaf 12 **** > > f: 026 3612317 **** > > 6921 EW Duiven **** > > e: [email protected]**** > > **** > > **** > > > > ------------------------------------------------------------------------------ > EMC VNX: the world's simplest storage, starting under $10K > The only unified storage solution that offers unified management > Up to 160% more powerful than alternatives and 25% more efficient. > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev > _______________________________________________ > Geoserver-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geoserver-users**** > > > > **** > > ** ** > > -- > Justin Deoliveira**** > > OpenGeo - http://opengeo.org**** > > Enterprise support for open source geospatial.**** > > ** ** > -- Justin Deoliveira OpenGeo - http://opengeo.org Enterprise support for open source geospatial.
<<image001.gif>>
------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
