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

learn more… | top users | synonyms (1)

3
votes
3answers
35 views

Calculate distance with JTS

I'm trying to get the distance between two points with JTS. The problem is that this function with JTS new Coordinate(Lon1,Lat1).distance(new Coordinate(Lon2,Lat2)) Is giving a different result ...
1
vote
0answers
17 views

Query all Object within n kilometer Radius with Hibernate Spatial?

I use hibernate spatial attach a geolocation to a car. My card domain class looks like this: import com.vividsolutions.jts.geom.Point class Card { String name Point location } My program is ...
0
votes
1answer
23 views

Geoserver WPS Request for jts:buffer (or something else) with Multipolygon

I want to create a WPS Request using the JTS:Buffer (or any other process). I'm using the built in WPS Request Builder from GeoServer. My Multipolygon looks like this: 52.52735668,12.71762844 ...
1
vote
0answers
48 views

How to create a JTS geometry with holes and islands?

I have a JTS multipolygon geometry created by an Polygon array: multipolygon = gf.createMultiPolygon(this.polygons.toArray(new Polygon[this.polygons.size()])); Those polygons can describe holes or ...
1
vote
0answers
48 views

How to tell if a line intersects a polygon not only at endpoints?

How do I do this in .net topology suite or jts? Please see image. Any other library that can I run on .NET is fine, or even a general algorithm if there is no option. For example this answer is only ...
6
votes
1answer
103 views

What is the difference between Spatial predicates “Covers” and “Contains”?

I try to understand the Spatial predicates of the DE-9IM Intersection matrix. I don't get the difference between predicates Covers (respective CoveredBy) and Contains (resp. Within). I try to draw ...
2
votes
1answer
65 views

How to create a new shape file from jts geometries?

What I use: Java 1.7, JTS 1.13, geotools.api 14 What I have finished: Creating correct JTS geometries from OSM relations, ways and nodes. What I want to achieve: Create a csv file which contains the ...
0
votes
1answer
55 views

Run the GUI of JTS 1.12

I've got an error in JSTS (JavaScript Topology Suite) library based on JTS (Java Topology Suite) v1.12 (r405). But there is no error in the last build of JTS on the same test case. So I want to check ...
1
vote
0answers
114 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
47 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
191 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
75 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
97 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
112 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
109 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
94 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
272 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
406 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 ...
1
vote
0answers
173 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
64 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
147 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
284 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
182 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") ...
2
votes
1answer
3k 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
1k 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
344 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
476 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 ...
2
votes
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
73 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
53 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
1answer
476 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
418 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
818 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
179 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
649 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
229 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
246 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
488 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
2k 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
592 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
280 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
785 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 ...