My apologies about formatting - you've probably received my initial post, which was posted in HTML format for some reason. I've corrected it shortly after initial submission.
My code is solely based on the tutorial you've mentioned. However, it still doesn't work. I guess the problem is in featureBuilder, probably something to do with my featureType, which I extract from the existing shapefile. I am not sure what featureBuilder.add(feature) does exactly though. I'll post my code again just in case: 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); Thanks! -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Problem-creaing-a-point-and-adding-it-to-featureCollection-tp4560392p4560472.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
