You will get a feature collection of all the features where the user
clicked; you can go through the feature collection if you like and
copy them into a feature collection.

Jody

On Tue, Oct 6, 2009 at 12:18 AM, dadar (via Nabble)
<[email protected]> wrote:
> so with that source I can access the data?
> how I put the data into array if there is 2 or more data in where I clicked
> the area?
>
> Darmawan
>
> Jody Garnett-2 wrote:
> A bounding box query (matching the area the person clicked) will do.
>
> There is an example in the user guide
> http://docs.codehaus.org/display/GEOTDOC/Filter+Examples
>
> Under "What did I click on":
>
> ReferencedEnvelope pixels = new ReferencedEnvelope( x-1,y-1, x+1, y+1,
> screenCRS );
> MathTransform screen2world= CRS.findMathTransform(screenCRS, dataCRS);
>
> ReferencedEnvelope selected = JTS.transform( pixels, null,
> screen2world, 10 );
>
> FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2
> ( GeoTools.getDefaultHints );
> Filter filter = ff.bbox( ff.property("THE_GEOM" ), ff.literal
> ( selected ) );
>
>
> Jody
>
> On 05/10/2009, at 4:15 PM, dadar wrote:
>
>>
>> I need to gain data from an area in my shapefile when i clicked it
>> does anybody know which function and how can I get the data??
>> and how can I get the center point (x,y) from a polygon??
>>
>> Darmawan
>> --
>> View this message in context:
>> http://n2.nabble.com/How-can-I-get-the-data-from-an-area-in-my-shapefile-tp3766988p3766988.html
>> Sent from the geotools-gt2-users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry® Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart
>> your
>> developing skills, take BlackBerry mobile applications to market and
>> stay
>> ahead of the curve. Join us from November 9-12, 2009. Register
>> now!
>> http://p.sf.net/sfu/devconf
>> _______________________________________________
>> Geotools-gt2-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
> ________________________________
> This email was sent by Jody Garnett-2 (via Nabble)
> Your replies will appear at
> http://n2.nabble.com/How-can-I-get-the-data-from-an-area-in-my-shapefile-tp3766988p3768757.html
> To receive all replies by email, subscribe to this discussion
>
>

-- 
View this message in context: 
http://n2.nabble.com/How-can-I-get-the-data-from-an-area-in-my-shapefile-tp3766988p3771427.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to