Quick reply; sorry to be terse :-) Replies in-line...
jorg wrote:
> Hi,
> I have some questions on shapefile-adaption and feature building.
> I read in Shapefiles from ArcGIS. The result of my read in process is a
> polygon FeatureCollection. Next I need to find for each Point in my
> FeatureCollection the next neighbour Point which is not part of the same
> polygon. Furthermore I musst check that their connection does not intersect
> any polygon line.
Sounds like you have a solid spatial problem here; a lot of your 
questions are going to be best answered on the JTS development list 
(where the topology geeks love problems like this). GeoTools kind of 
steps out of the picture the moment you got your hands on a JTS Geometry. 
> My first problem is how to extract the points out of the polygon
> FeatureCollection. How can I access just one point or only its coordinates?
>   
Many ways:
- take apart the pologygon; external ring; internal rings; each 
LinearRing has coordiantes - it sounds like for your problem you may not 
care about holes?
- as one big CoordinateSequence; there is a method on Geometry to get that
> My next problem is building the LineString Feature between this two points
> for checking the intersection. I know how to build the Geometry LineString
> but the Feature Builder for converting the Geometry LineString into Feature
> LineString does not work.
Why do you still need Features? Are you not just testing the geometries 
for a very complicated relationship?
> It's also important that this LineString Feature is a JTS LineString because 
> this is needed for adding the LineString to a new Feature Collection. How can 
> I solve this problem?
> Is it necessary to use geotools 2.5 for my task (which contains the Builder)
> or can I write this function in geotools 2.4 too?
>   
You can make use of geotools 2.4; in GeoTools 2.4 the FeatureType is 
used as a factory; it has a FeatureType.create method...check near the 
end of the user guide for deprecated examples.
> It would be really great if somebody could help me... Thank you very much in 
> advance!
>   
Cheers,
Jody

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to