Hello to you all!
I've just started working with geotools and I managed to create an
application in java that opens one or more layers, send data intro a jtable
and then exports it to excel. But now I'm stuck and I can't find an answer
to my problem: I want to search values in the shapefile database and based
on them to get another attribute, for example:
I have a map with city names as NAME and coordinates as the_geom. When I
search Paris I want to get the coordinates of the city printed, as a string
for example.
I've tried with
static FeatureCollection grabSelectedName(String name) throws Exception {
FeatureSource fs = null;
return fs.getFeatures(CQL.toFilter("NAME = '" + name + "'"));
}
but I'm not sure this will do what I want and I don't know how to use it.
Looking forward to you answer!
Thank you so much!
Laura
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/shapefile-query-tp5439164p5439164.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users