an API of 2D spatial predicates and functions that was formerly known simply as JTS

learn more… | top users | synonyms (1)

1
vote
0answers
25 views

How to get geoJSON from spring REST Controller?

I am developing a GIS application with java(Spring-4.1.5 + Hibernate-4.3.8) and OpenLayers. For this project I use GeoTools-13RC, HibernateSptial-4.3, jts-1.13 and jackson-2.5. In this project, I have ...
0
votes
0answers
32 views

JTS Geometry to GML3.1 encoding

I searched all the internet and I didn't find a solution to my problem. I want to convert a JTS geometry to a GML3.1 geometry. Geo tools says that have support but the have not (please check encode ...
1
vote
1answer
67 views

How to transform data from a custom projection in JTS?

I have some data in NAD_1983_StatePlane_Texas_Central_FIPS_4203_Feet I wish to programmatically transform the coordinates to Lat long in WGS84 datum using JTS. I know that JTS can transform the ...
1
vote
1answer
34 views

How to create arc from points using JTS library?

I have start point , end point , center point, angle, radius of arc. I want to create a arc from these data. I tried to Use JTS library to create arc. but when I checked its source code I am confused ...
1
vote
0answers
54 views

Leaflet CRS.Simple or CRS.EPSG3857 conversion Problem

I'm using v-leaflet (0.61) , a vaadin plugin, to visualize some layers over a map. Clicking on the map, I create a wms query to geoserver. The query needs some parameters and one of them is the bbox. ...
1
vote
1answer
68 views

Cover a polygon with fixed size squares

Can you please advice me of an algorithm (which I can implement in a Java) to cover some polygon (not exact cover) with squares of certain size (aXa squares)? The cover doesn't have to be exact - ...
0
votes
2answers
78 views

Densify a JTS LINESTRING (add points)

I have a LineString I would like to "soften" in a way that if two coordinates (vertices) in the LineString are very far apart, I want to automatically add some coordinates in between. The line ...
1
vote
1answer
78 views

Create a generic shape and draw it as a polygon with center (or base) and rotation?

In Java (jts), is there a way to draw a generic shape, eg. bounded in meters, and apply this to a coordinate, with rotation around a center or base? Something like: double lat = 65.100 double lon = ...
2
votes
1answer
172 views

JTS “points must form a closed linestring”

I'm trying to create a polygon and calculate it's area using final GeometryFactory gf = new GeometryFactory(); final ArrayList<Coordinate> points = new ArrayList<Coordinate>(); ...
2
votes
1answer
308 views

Check if line crosses a polygon

What I'm trying to do is with JSTS to check with lineGeom.crosses(polygonGeom) function if a line is crossing completely a polygon. The problem is that both cases from the picture returns true. I ...
0
votes
0answers
132 views

Splitting multiple polygons with a line in JTS geotools

i am using geotools as my GIS map solution. now i want to split multiple polygons to build a road or river. passing through multiple polygons so, can you plz help me how to do this splitting a single ...
0
votes
0answers
31 views

WKBreader reuse - jts 1.9

I'm having some bad behavior reusing wkbreader. The context as of a single threaded as I use threadlocal wkbreader. I get parse exception on some geoms. When I create a new wkbreader for each ...
1
vote
0answers
145 views

Converting geometry to geography using org.geotools.geometry.jts.JTS

I'm trying to convert com.vividsolutions.jts.geom.Geometry to geography, using the GeoTools package - org.geotools.geometry.jts.JTS. This is my code: public Geometry getGeography() { Geometry geo ...
1
vote
1answer
60 views

What topologic relation means “interior-disjoint”?

I am using the JTS Topology Suite, and trying to write an expression that means "shape A and shape B are interior disjoint". I read this documentation page but I don't entirely understand the ...
1
vote
1answer
103 views

How to check for overlapping check with tolerance using JTS / GeoTools

I have several hundered polygons which may overlap but need to be considered 'not overlapping' when the overlapping is less than 1 meter. The overlapping check in JTS does not offer a tolerance ...
0
votes
1answer
249 views

Is it possible to use JTS for calculations on data in geographic coordinates?

I have 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 ...
1
vote
0answers
166 views

Hibernate Spatial - Query within an X kilometer radius?

I am new to Hibernate Spatial, and am trying to perform a simple query of objects within a given radius. I've created a number of entries in my database with properties corresponding to a latitude ...
4
votes
2answers
1k views

How to get JSON representation from JTS Geometry?

I'm using JTS (http://www.vividsolutions.com/jts/JTSHome.htm) and need to get a JSON representation of a Point : Hibernate beam: @Type(type = "org.hibernate.spatial.GeometryType") ...
1
vote
1answer
2k views

How to calculate centroid of a polygon defined by a list of longitude/latitude points? [duplicate]

I've imported some polygons (ways) from OpenStreetMap and now want to calculate the centroids of them. For this purpose I wrote following code: final List<Point2D.Double> points = ...
2
votes
1answer
952 views

GeoTools and PostGIS with ESPG:3857

I'm trying to use both PostGIS and GeoTools with the same ESPG:3857 projection, however, it looks like the projections in PostGIS and GeoTools differ. This is what I have in PostGIS: PROJCS["WGS 84 ...
1
vote
2answers
276 views

How to work with the STRtree Index when object in the index change it's position?

I'm work with the NTS(NetTopologySuite), I get large amounts of Point geometries, for fast querying the point object, I make the STRtree Index like this, STRtree tree = new STRtree(); foreach (var p ...
1
vote
1answer
385 views

JTS Polygon simplification without holes

I have a set of polygons without holes. I wish to merge any intersecting polygons. I don't want to have any holes in my simplified polygons. Is there a recommended way to achieve this using JTS? The ...
1
vote
1answer
1k views

combine several polygon objects in one polygon object with geotools (is it possible)?

I have several polygon objects and I need to "merge (or combine or dissolve)" them toghether into one polygon object. With a GIS tool like Quantum GIS, I do this with Geoprocessing option "Combine ...
1
vote
0answers
70 views

JTS difference op followed by an intersection op not returning expected results

I have two overlapping polygons and I want to get the line segment(s) where the edges cross. So I begin by performing a Difference operation. That gives me the area where A is "outside" of B. ...
2
votes
1answer
48 views

Where is the official website of the JTS project?

I'm using the JTS API, published at http://www.vividsolutions.com/jts/JTSHome.htm However, there is another JTS API, published at http://sourceforge.net/projects/jts-topo-suite/ The former is version ...
2
votes
0answers
437 views

JTS - Java Topology Suite - Calculate radius from a given point

From point A, I want to check if a point B is within a certain radius from A. How calculate it usindo JTS? I tried this: Coordinate posicaoAtual = new Coordinate(-12.974900375893823, ...
0
votes
1answer
375 views

geotools / jts crs transformation result not at correct position

I copied the example from geotools, which shows how to transform a shapefile into a different projection. (http://docs.geotools.org/latest/userguide/tutorial/geometry/geometrycrs.html) But when ...
1
vote
1answer
667 views

Intersection with JTS Geometry

I want to calculate an intersection between two geometries with the intersection function from JTS Geometry. What happens, if the geometries have different SRIDs? SimpleFeature sf1=...; //SRID ...
3
votes
1answer
169 views

How can i topologically sort 2D triangles and put in an array?

I have a set of 2D triangles in a Geometry array which together forms a connected strip when placed them according to edge adjacency. However, in the array they are not in topological order based on ...
3
votes
0answers
563 views

What is the best way to convert WKT String to GML String

What is the best way to programatically convert WKT String to GML String? Every reasonable library (at best available in some Maven repository) can be used. Till now I came up with this solution ...
3
votes
1answer
194 views

Is there an alternative for JTS TestBuilder on Linux?

JTS Testbuilder, an application for testing JTS functions, is available on Windows and I use it quite regularly. Are there anything like this on Linux? Does GEOS have anything similar to this on ...
3
votes
1answer
229 views

How can I get KML into JTS TestBuilder?

JTS Topology Suite TestBuilder supports WKT, WKB and GML inputs. What's a quick and easy way to get the geometry for a KML feature into one of these formats for input into JTS TestBuilder? For ...
5
votes
3answers
441 views

Trying to combine nearby points into a polygon

We have collected millions of cell phone strength readings. I am trying to group points of the same strenght that are within a distance of each other in to a polygon. I asked on the postgis mailing ...
6
votes
1answer
1k views

Find Perpendicular Distance and Minimum Perpendicular Vector between a Point and a Line using GeoTools and JTS

I have a line formed by 2 lat/lon pairs, and the lat/lon of a point. I would like to find out the perpendicular distance between the line and the point on the Earth surface (can assume Earth as great ...
6
votes
2answers
514 views

Is it good practice to manage all JTS spatial objects as abstract Geometry instances?

I'm new to all this GIS business, and am developing a Java web app using the JTS library. I'm trying to get my head around the JTS classes and how they're supposed to be used. I have some existing ...
8
votes
0answers
273 views

Solutions for fast operations on large GIS datasets [duplicate]

Possible Duplicate: Acquiring ArcGIS-like speed in Postgis I have been using PostGIS 2.0 for all of my GIS operations. PostGIS is an excellent GIS database, but no matter how I format my ...
4
votes
2answers
700 views

is there a way to tell if two linestrings “really” intersect in JTS or GEOS

In JTS (or GEOS) you can't tell if two linestrings really cross each other. The result is exactly the same whether the lines simply have a point in common but don't cross or if they really cross. Is ...