New answers tagged java
GDAL is your best bet here. My code sample is in C++, however the Java bindings have the same essential API, so the concept will carry over. This is code chopped from another project. The key is to create two SpatialReference objects, then set their datums. For the output, since it is in UTM, you set the UTM zone there. Normally, you pick the best utm ...
You can take a look to these old slides by Jody Garnet.
GeoTools is a Java library which can read and write GeoJSON and provides access to features like area via the JTS library. It will also help you to reproject the geometries from the lat/lon of GeoJSON to a suitable projection for calculating areas in m^2.
You can do this several ways, I think that the easiest (if you only have a few GIS things to do) is to use Turf see here There are also a couple of GIS library whom are a bit heavier (size wise) leaflet: how to After you can also try openlayers3
Yoy need to specify the classpath. The error is saying that a class is not being found. Execute your file with the cp option: java -cp osm2po-core-5.0.0-signed.jar TestOSM
Ok, so I found by myself the solution thanks to @user30184 comment. The key principal is using JTS rotation via Math Transformation. //my base point Coordinate ancorPoint = placeCoordinate; //create orthogonal point in distance of 0.001 arc degrees Coordinate endingCoordinate = new Coordinate(placeCoordinate.x+0.001, placeCoordinate.y); //rotate by 90 ...
A very simple solution: solve an equasion for each pair of poly vertices. An algorithm for one segment of the polygon (gray in the picture) with points a and b: vector A is just point a coordinates vector S(egment) = b - a vector N is normal to S (-ys, xs) vector P is coordinates of point You want to check the length of normal from point to Segment ...
Since this question was tagged with Java, I'd put my weight behind Conveyal's gtfs-editor, a webapp which runs on Java via the Play framework. It's pretty easy to get going if you're familiar with CLI. https://github.com/conveyal/gtfs-editor
GTFS editor - www.mobilibus.com.br Create acount - http://editor.mobilibus.com/create-account.html
You can look in the Other GTFS tools section from the old "googletransitdatafeed" on Google code. PS: After answering, I've seen my answer was also in the comment...
Top 50 recent answers are included