This is an example of a spatial join; something we don't have native support 
for in the shapefile format; but you can accomplish using a couple of loops as 
indicated in the user guide here:
- http://docs.geotools.org/latest/userguide/library/main/collection.html#join

-- 
Jody Garnett

On Tuesday, 10 May 2011 at 6:20 PM, ballibum wrote: 
> Hello List,
> 
> i hope someone can help me. I have got a pointlayer and a polygonlayer with
> more than one polygon (both in shape). The Pointlayer has only an id and the
> coordinates, the polygonlayer has got an id, the coordinates and a extra
> attribute.
> Now, i want to look which point is in which polygon and than i want to add
> the extra attribute to the attributes ot the point.
> I don't know how i can realize that.
> 
> I have got both files in my programmcode:
> 
> FileDataStore store_point = FileDataStoreFinder.getDataStore(file_point);
>  SimpleFeatureSource featureSource_point =
> store_point.getFeatureSource();
>  SimpleFeatureCollection featureCollection_point =
> featureSource_point.getFeatures();
> 
> FileDataStore store_poly = FileDataStoreFinder.getDataStore(file_poly);
>  SimpleFeatureSource featureSource_poly =
> store_poly.getFeatureSource();
>  SimpleFeatureCollection featureCollection_poly =
> featureSource_poly.getFeatures();
> 
> 
> thanks for helping me
> balli
> 
> --
> View this message in context: 
> http://osgeo-org.1803224.n2.nabble.com/Point-and-Polygonlayer-tp6346978p6346978.html
> Sent from the geotools-gt2-users mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> Achieve unprecedented app performance and reliability
> What every C/C++ and Fortran developer should know.
> Learn how Intel has extended the reach of its next-generation tools
> to help boost performance applications - inlcuding clusters.
> http://p.sf.net/sfu/intel-dev2devmay
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
> 
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to