Package org.genesys.geotools.service
Class ShapefileUtils
- java.lang.Object
-
- org.genesys.geotools.service.ShapefileUtils
-
public class ShapefileUtils extends Object
The Class ShapefileUtils.
-
-
Constructor Summary
Constructors Constructor Description ShapefileUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.locationtech.jts.geom.GeometrygetPointBuffer(double longitude, double latitude, double distanceMeters)Uses ideas from https://geoaware.wordpress.com/2013/10/16/geodetic-buffers-with-geotools/static org.geotools.data.DataStoreopenShapeFile(File shapeFile)Open shape file.
-
-
-
Method Detail
-
openShapeFile
public static org.geotools.data.DataStore openShapeFile(File shapeFile) throws MalformedURLException, IOException
Open shape file.- Parameters:
shapeFile- the shape file- Returns:
- the data store
- Throws:
MalformedURLException- the malformed url exceptionIOException- Signals that an I/O exception has occurred.
-
getPointBuffer
public static org.locationtech.jts.geom.Geometry getPointBuffer(double longitude, double latitude, double distanceMeters) throws org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException, org.opengis.referencing.FactoryExceptionUses ideas from https://geoaware.wordpress.com/2013/10/16/geodetic-buffers-with-geotools/- Parameters:
longitude- the longitudelatitude- the latitudedistanceMeters- the distance meters- Returns:
- the point buffer
- Throws:
org.opengis.geometry.MismatchedDimensionException- the mismatched dimension exceptionorg.opengis.referencing.operation.TransformException- the transform exceptionorg.opengis.referencing.FactoryException- the factory exception
-
-