Skip to main content
Made title more concise
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

how to create a Creating point on a shape file usingin shapefile from latitude longitude/longitude using GeoTools?

Source Link

how to create a point on a shape file using latitude longitude

I m new to geotools and i find bit difficult to plot a point using the latitude and longitude values. can any one heple me out to solve my problem.

GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory():
SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(TYPE); 
Point point = geometryFactory.createPoint(new Coordinate(longitude, latitude));
featureBuilder.add(point);

but this code is not working properly. could any one explain why..?