Hot answers tagged jts
3
I would not use a conventional point->polygon process because that expects your points to define the boundary of a polygon and it doesn't sound like yours do. It sounds like yours are hotspots that are somehow related.
However, there are lots of ways to create polygons for this sort of situation depending on what is sensitive in your data. Here's a few ...
2
Use the ogr2ogr utility to convert your KML to GML. See some samples on how to use the utility here.
ogr2ogr -f GML output.gml input.kml
should do the trick.
2
I have been using NetTopologySuite(a C# port of JTS) for a while. So I assume that most things stay the same as that of JTS. Hopefully Java code could be similar to the c# ones :)
My attempts answering some questions..
what is the canonical way to convert a String to a Point?
A direct casting from IGeometry to IPoint has worked as the below code ...
2
I would perform both a left and right single-sided offset buffer on one of the linestrings and test if the other linestring crosses both sides of the offset buffer. You would need to use a suitable small buffer distance for your analysis.
For example, using Shapely:
from shapely.wkt import loads
def actually_crosses(A, B, precis=0.0001):
"""A hybrid ...
1
I think it depends.
ESRI's geometric library is similar to JTS, but you need to think about readability and maintenance.
Why do you need to check your geometries type everytime you pass them around? That is unnecessary and riddles your code with if clauses that do nothing. Java is statically typed, so, go ahead and use your types.
If you have a method ...
Only top voted, non community-wiki answers of a minimum length are eligible

