GeoTools is an open source Java library that provides tools for geospatial data.

learn more… | top users | synonyms

3
votes
2answers
505 views

Different definition of EPSG:3857 in GeoTools and QGIS

I want to do some checking if my point lies in any of the polygons defined in shapefile. So, I thought that I will determine CRS from shapefile (created in QGIS), and use it for transformation (where ...
5
votes
1answer
743 views

How to sort a SimpleFeatureCollection using GeoTools?

I have a featurecollection: SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(dbFeatureType); SimpleFeatureCollection collection = FeatureCollections.newCollection(); while (mifReader....
1
vote
1answer
8 views

Geotools - Create a line layer

I am using the Geotools library to develop a Java Swing application. I am having a problem creating a layer with lines between points. Can someone help me? Here my code: import com.vividsolutions....
0
votes
1answer
25 views

JTS Intersection

I am testing the intersection method of JTS / GeoTools I intersected 2 lines. Then I test if the intersection point intersects with one of the lines. The result should be true. But it is false if I ...
0
votes
1answer
196 views

Calculating intersection between lines with GeoTools (java)

I have ArratList<Segment> (N segments - array size is N) when: public class Segment { Node vertex_1; Node vertex_2; } public class Node { double latitude; double longitude; } ...
-3
votes
1answer
17 views

Converting shapefile to KML using GeoTools?

I am developing a GIS-based desktop tool for a land area in geotool. How we can convert shapefile into KML file?
1
vote
0answers
21 views

Cropping a layer to an input raster

I have layers based on GeoTIFF files, provided by GeoServer, that are displayed as overlays over base maps from OpenStreetMaps, Bing, Google via OpenLayers. I want to mask out areas from the GeoTIFF ...
1
vote
2answers
228 views

Creating a raster file from a shapefile using GeoTools with different colours for different features

The shapefiles that I am processing display information on an operation of a piece of equipment over an area, where the information is stored in steps as polygon features with various attributes and ...
2
votes
1answer
305 views

Error Reading ESRI ArcGrid File using GeoTools?

I have a raster file in ESRI ArcGrid format (e.g. hdr.adf). I would like to run some analysis using GeoTools. I've never used the coverage classes before and I'm having a few problems out of the gates....
1
vote
1answer
223 views

How to combine LineStrings using JTS

I want to combine LineStrings with common points. The scenario looks like this: I tried it using the GeometryCollection.union() method like suggested here: http://docs.geotools.org/latest/userguide/...
0
votes
1answer
528 views

Direct connection from geotools to arcgis 10.3

Is it possible to direcly connect to ESRI 10.3 database using geotools ? I use geotools 13.0 and have ESRI database set up on oracle. Previously I was able to connect to SDE using gt-arcsde-plugin ...
1
vote
1answer
21 views

ExternalGraphics - gray squares instead

I am creating point symbolizer with external graphic, and it works great if I load an image/png, but when I try to load svg file I get gray squares on map StyleFactory sf = CommonFactoryFinder....
0
votes
2answers
49 views

Using Geotools or GeoserverManager to add a layer using just an URL

Lets say I have just an URL to a Layer in OpenLayers format: http://www.geoservicos.ibge.gov.br/geoserver/CREN/wms?service=WMS&version=1.1.0&request=GetMap&layers=HidrogeologiaRegiaoNE ...
2
votes
2answers
84 views

Converting bbox when importing GeoTIFF with Geotools?

Here is my code: String EPSG4326 = "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,...
1
vote
0answers
23 views

using java to get ways from osm [closed]

I just try to figure out how to query all ways within a radius of let's say 1km from a defined point. Here is an example of what I mean: I've already read about overpass api, GeoTools and ...
0
votes
1answer
288 views

How to add RGBA color map to single band GeoTIFF using GeoTools 2.x?

I am developing a light weight GIS application, and am looking for the simplest way to add an RGBA color map to a single band GeoTIFF using GeoTools 2.x?
0
votes
0answers
10 views

Geotools Getcapabilities timeout

I'm using geotools to get all layers from a Geoserver. WMSCapabilities caps = null; try { WebMapServer wms = new WebMapServer( sourceServer, 1000000 ); caps = wms....
4
votes
3answers
1k views

how to find necessary geoserver/geotools maven dependencies for a class?

I am trying to create a Web Processing Service with GeoServer. I used maven following opengeo instructions, and I get an eclipse project with a pom.xml file with dependencies like the following: <...
0
votes
1answer
284 views

GeoTools, convert CRS for Google Maps

I'm trying to use GeoTools to convert coordinates from EPSG:3857 to various CRS, in order to display WMS layers on a Google Map. For example, I want to display a layer in the EPSG:4326 CRS. I have ...
2
votes
0answers
16 views

set bounds for pointLayer based on another layer size

I am creating a simple method for drawing Points on map, and have problem with full extent. I create a new point layer and add it to mapContent, and the problem is that it set bounds somewhere around ...
0
votes
0answers
15 views

OpenStreetMap data in JTS / GeoTools

I want to do spatial analysis with OpenStreetMap data using the JTS / GeoTools library for Java. Which precision model shall I use? Since OpenStreetMap data usally does not have more than 7 digits, ...
1
vote
1answer
27 views

Choosing opengis or geotools imports dealing with geotools library?

In some cases, I have to use some classes of GeoTools library. Most of class names are duplicated in org.geotools and org.opengis package. for example, StyleVisitor, Symbolizer, PointSymbolizer, etc....
2
votes
0answers
29 views

Coordinate Reference Systems error CRSAuthorityFactory

When I try to set CRS in geotools application first time it works great but after that I get FactoryNotFoundException it shows me this in console Exception in thread "AWT-EventQueue-0" java.lang....
0
votes
1answer
43 views

MultiSelectionTool - selecting multiple content in multiple layers

I am trying to create MultiSelectionTool that will work in multi, and have a problem with extending selection if Ctrl is pressed while selecting, it just deselect the everything else before and start ...
0
votes
0answers
15 views

Can't get a response from a wfs2.0.0 using Geotools

I have some issues with the WFS-NG extension of Geotools 14.3. I am using the code below to get a data store from a distant server : String getCapabilities = "http://ids.craig.fr/wxs/public/wfs?...
1
vote
0answers
26 views

Read a shapefile and write an identical one using GeoTools

How would one go about reading a shapefile using GeoTools and then writing it to disk so that the read and written are as identical as possible (idempotent)? I do not feel familiar enough with ...
2
votes
1answer
25 views

Load WMS into Map (Geotools)

At the Moment I try to load a WMS-Map into a Java Geotools Project. I followed every Step in the Userguide of Geotools. (here the Link: http://docs.geotools.org/latest/userguide/extension/wms/wms.html#...
0
votes
2answers
116 views

How to clear JMapFrame with multiple layers

Is there any way to clear a JMapFrame and all of its layers before opening a new file? I currently am running into an error (exception no stack trace) while opening a file with one already open that ...
0
votes
1answer
201 views

GeoTools WFS Query sortBy not working for GeoServer WFS

I am using GeoTools to query a GeoServer WFS using the following code: Map connectionParameters = new HashMap(); connectionParameters.put("WFSDataStoreFactory:GET_CAPABILITIES_URL", String....
1
vote
2answers
232 views

Defining coordinate reference system with rotation in GeoServer?

I am using GeoServer and have a layer in EPSG:900913 ("Google Mercator"). I need to "rotate" the map around certain point (say, 1500000, 7000000) by certain degree (say, 30 degrees clockwise). How ...
0
votes
1answer
29 views

Drawing external text value on a point layer using TextSymbolizer of GeoTools?

I'm using GeoTools 14.3. I've used the following code segment to create a textsymbolizer on a point layer. StyleBuilder sb = new StyleBuilder(); FilterFactory2 ff = CommonFactoryFinder....
0
votes
0answers
23 views

Shortest path calculation from shapefile data using GeoTools?

I'm using geotools 14.3 with swing to load two shape files. A road network and a node network (road junctions). Objective I want to calculate the shortest path from each node to every other node. I'...
3
votes
1answer
654 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 ...
2
votes
1answer
32 views

How to specify default value for Rotation in SLD?

Am using geotools to render a set of point features. I have SLD for styling point features. The SLD uses an expression to calculate Rotation value based on Angle attribute value of feature. The ...
2
votes
0answers
322 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 ...
1
vote
1answer
91 views

Parsing and rendering JSON data in Java with GeoTools [closed]

I'm working on a Web Map Service written in Java and using the GeoTools library. My goal is to make the data parsing json format, so I'm using the form Unsupported GeoTools. This is the parsingJSON ...
-2
votes
1answer
32 views

Getting started with Geotools? [closed]

I want to get full guidance for using geotools from scratch in Java language. Can you show me the path or give me the suggestions about where I can start this? I am an intermediate level of java ...
1
vote
1answer
72 views

Representing json data on a map with GeoTools (Java)

I'm working on a Web Map Service in Java. Practically this WMS allows me to represent the map of open data type (shp, kml and gml). I'm going to start working even with data in json format, and for ...
0
votes
1answer
87 views

Read WKT geometry using JTS 1.13 in java

I want to create a shape file from coordinates, in the client side I take the coordinates of a polygon by opelayers, it send to a java class, in this class read the geometry of the polygon, when the ...
1
vote
1answer
30 views

GeoTools : Zoom, Pan, Move custom action (setState not working)

I'm using geotools v14.3. Until now I've been using ZoomInAction() to add a zoom in button to my loaded map. Now I want to add a custom toolbar for zooming, panning, resetting and other general ...
0
votes
1answer
59 views

Geotools : adding multiple points to the same layer

I've got a java Swing application which loads a shapefile and draw a map. Now I need to allow the user to click on the map and add points. I've successfully completed that with the following code. ...
1
vote
1answer
137 views

Geotools WFS basic authentication

I'm trying to retrieve data from remote WFS server which requires basic https authentication using GeoTools. I defined connection parameters for username and password like connectionParameters.put("...
2
votes
1answer
32 views

Geotools : New points now drawn on the map

I'm using geotools v14.3 to load a shapefile (Java Swing application). I want to allow the customers to use the mouse to click on the map area to draw new points, lines and polygons. First, I'm ...
1
vote
1answer
431 views

Create shapefile based on geojson data with geotools (Java)

I'm using Geotools 14.0 for Java and I'm trying to generate shapefile based on data from GeoJSON. Here is my code: try { String url = "geojson.json"; File geojson = new File(url); ...
3
votes
1answer
53 views

Geotools 12.3 creating shape file from coordinates

I want to export a vector layer to a shape file (create a zip file with .dbf, .fix. prj and .shp), but when the exported .shp file is opened in a Desktop GIS it doesn't show anything. For the ...
1
vote
1answer
23 views

geotools : styling features based on a custom rule

I have a java swing app which loads lines shapefiles which represents a road system. I want to show the congested roads on this map with a separate style. My current approach I have two attributes ...
1
vote
1answer
37 views

How to print positions of grid lines?

I am using geotools, my goal is to print locations (of grid) in normal way. How to prepare style in a correct way? public Style createLineStyle2() { StyleBuilder sb = new StyleBuilder(); ...
1
vote
1answer
14 views

Geotools : Using filters to filter a variable value

I have a java swing app which loads a line shape file and draw a map. I'm using a filter and a rule to filter out the lines in the shape file where the attribute "traffic" is greater than 500. Each ...
1
vote
2answers
175 views

Elasticsearch datastore for GeoServer

When searching for a possibility to use an Elasticsearch data store as a data source in GeoServer, I found this inofficial plugin. Its documentation states that you have to clone the Git repository ...
1
vote
0answers
23 views

StreamingRenderer

I have a problem in my code (Java Geotools). When I draw in my carte map a LineString sometimes when I run my program an errors apears and I don't understand what does it means. Error: avr. 14, ...