The JTS Topology Suite is an open source API of 2D spatial predicates and functions written in Java.
Questions tagged [jts]
200 questions
0
votes
1 answer
Adding FeatureCollection to a FeatureStore throwing AbstractMethodError
This method is supposed to replace the features in the database with new features I pass to it.
private static void replaceBoundaryShape(FeatureCollection dbFeatures) throws IOException, CQLException{
…

Nick M.
- 1
- 2
0
votes
1 answer
SDO_GEOM.VALIDATE_GEOMETRY method 13349 Error
I am using jts geometry object to store my geometry objects as an Oracle SDO_Geometry. My geometries in WGS84 coordinates. Even I created a spatial index still have some problems when I try to validate my geometry with SDO_GEOM.VALIDATE_GEOMETRY…

Merve Kaya
- 111
- 7
0
votes
1 answer
How to compute spatial relationships from bounding boxes?
Let's say that I have an image with some kind of figures in it. An user can select 2 of them by drawing a bounding box around a figure. What I would like to do is to compute various spatial relationships between these 2 bounding boxes (so 2…

Kami
- 1,079
- 2
- 13
- 28
0
votes
1 answer
Solr spatial search , polygon intersect error
I am trying spatial search in SOLR 5.0 , My system are up and running, but sometimes I am coming across this error, I have google it around but found no explanation as such, anyone please help me with this.
My Error
because:…

Dimag Kharab
- 4,439
- 1
- 24
- 45
0
votes
1 answer
how to simplify a line using JTS?
I have a List which represents a route.
I want to simplify it using JTS.
I saw few method but I wasn't sure which one will fit my needs the best:
1) how can I convert my coordinate to geometry (line?)…

Elad Benda
- 35,076
- 87
- 265
- 471
0
votes
2 answers
Apache-Spark: method in foreach doesn't work
I read file from HDFS, which contains x1,x2,y1,y2 representing a envelope in JTS.
I would like to use those data to build STRtree in foreach.
val inputData = sc.textFile(inputDataPath).cache()
val strtree = new STRtree
inputData.foreach(line =>…

chenzhongpu
- 6,193
- 8
- 41
- 79
0
votes
1 answer
JTS + reading geodata: Number of points must be 0 or >3
I'm trying to read some geodate from file. I'm using the geotools package in java.
I have the geodata available as kml, gml and.shp, those are pretty big files.
Those come from an external bron and are formatted correctly.
When I want to read tools,…

jeanke
- 13
- 2
0
votes
1 answer
CGAlgorithms.isCCW from Java Topology Suite gives opposite results
I'm trying to test whether a ring of coordinates is clockwise or counter-clockwise. As far as I can see, there is a method CGAlgorithms.isCCW exactly for that. However, whatever ring I supply to that method, the result is the opposite of the…

gvlasov
- 18,638
- 21
- 74
- 110
0
votes
1 answer
JTS.orthodromicDistance incorrectly calculate the equatorial radius of the earth
JTS.orthodromicDistance(new Coordinate(0,0), new Coordinate(180,0), DefaultGeographicCRS.WGS84) * 2 is equal to 40075016 but must be equal to 6378000.

GPelya
- 3
- 2
0
votes
1 answer
JTS with lat/lon
I'm having some spatial data that has all of its coordinates as lat/lon pairs (with about 10 digits decimal precision), it's stored in a database as WGS84 data.Some of the data is represented as polygons which are the resulting union of some smaller…

dpp
- 1
- 2
0
votes
1 answer
JTS : distance between two geometries bypassing another one in the middle
Let's say that I want to calculate the distance between two geometries with JTS, but there is another one in the middle that I can't go across (as if it was a wall). It could look like this :
I wonder how I could calculate that.
In this case,…

krause
- 436
- 5
- 24
0
votes
1 answer
Implementing Algorithms in RenderScript
I am currently doing a project on benchmarking GPU performance vs CPU performance in mobile devices (Android) through a variety of algorithms. (Mainly computational geometric ones)
The problem I am currently facing, is how to implement these…

user3006812
- 41
- 5
0
votes
1 answer
Are there any alternatives to the JTS WKTReader?
I am using the JTS Topology Suite to process some geometry in my application. As a starting point I instantiate a reader:
WKTReader reader = new WKTReader();
Then, using the reader I check for polygon records:
Geometry poly =…

Aravintha Bashyam.c
- 100
- 4
- 16
0
votes
1 answer
"Infinitely large" geometry that intersects and contains everything in spatial DB
I have a database table of areas that can contain each other resulting in a tree/forest structure. Each area has a parent pointer and top-level areas have a null parent.
I would like to change this so there is a single top-level area that contains…

takteek
- 7,020
- 2
- 39
- 70
0
votes
1 answer
using jaxb, hyperjaxb3, jpa2, jts, hibernate-spatial, postgis fails when hyperjaxb marks the JTS Point getter as @Transient
My coworkers lament my adherence to code generation, but I'm determined to prove this particular chain can be done. Examples below are simplified from my project (and thus untested as typed); I will create a test harness soon. Currently using…

jesse crossley
- 56
- 4