Hi guys,

I am implementing an interpolation of trajectory points. So, basically, I
need to create several points along the azimuth from a starting point to a
destination point. The problem is, I can't add a created point to a
collection:

SimpleFeatureType featureType = featureSource.getSchema();
        
GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory(null);
SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(featureType);

SimpleFeatureCollection collection = featureSource.getFeatures();

/* Irrelevant code here
-----------------------
*/

Point2D newPt = setPointByAzimuth(startingPointCoords, azimuth,
distance_to_next_point);

Point pointToCollection = geometryFactory.createPoint(new
Coordinate(newPt.getX(), newPt.getY()));

featureBuilder.add(pointToCollection); //not quite sure what this does

SimpleFeature feature = featureBuilder.buildFeature(null);                      

collection.add(feature);

However, when I run this, the collection size does not change and nothing
gets added to this collection.
I am not sure what's the problem here.

Thanks,



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Problem-creaing-a-point-and-adding-it-to-featureCollection-tp4560392p4560392.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to