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

learn more… | top users | synonyms

3
votes
2answers
486 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 ...
2
votes
0answers
8 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
9 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
0answers
11 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, ...
5
votes
1answer
732 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
23 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....
1
vote
2answers
188 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
0answers
25 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
41 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
12 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?...
0
votes
1answer
505 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
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 ...
1
vote
1answer
122 views

Using Geotools union() method (to combine LineStrings)

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/...
2
votes
1answer
289 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....
2
votes
1answer
20 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
99 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
284 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
1answer
190 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....
0
votes
1answer
273 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 ...
1
vote
2answers
224 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
22 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
18 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
581 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
24 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
310 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
70 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
27 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
64 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
63 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
24 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
45 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
135 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
18 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
378 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
49 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
18 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
13 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
153 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
20 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, ...
1
vote
0answers
65 views

Addressing a WPS using Geotools' ExecuteProcessRequest

I am trying to address a WPS that is running on a known machine to retrieve some isochrones. Below are excerpts from the relevant parts of the WSDL of said server: <schema xmlns="http://www.w3.org/...
0
votes
1answer
22 views

Geotools : A layer to draw the traffic volume of a road

I have developed a standalone swing application loaded with a shapefile of a road network using geotools (v.14.3). Now I would like to implement a feature where the user may zoom the map, and at a pre-...
0
votes
2answers
35 views

GeoTools getFeatures takes forever

I wrote the following method as an onClick handler. First and second click, I got result from DB. By the third time, the code stopped in the "getFeatures(trgtFilter)" line and didn't return. In debug ...
1
vote
1answer
12 views

Adding Styles like LineColor, Fill Color to SimpleFeaturePolygons while exporting them into a kml file

I am trying to export features(polygons) in to a KML file. I am able to get KML file with the given features. Here all lines are coming in a white color. How can i give different colors to different ...
1
vote
0answers
15 views

Geotools : Getting currently click layer from MapLayerTable

I've added a MapLayerTable to my application, and I'm loading multiple layers using shape files successfully. Now I would like to select features on the map of the selected layer. For this, I would ...
1
vote
1answer
43 views

Feature selection in multiple shapefile layers

I've followed the geotools selection lab tutorial. It works perfectly. Now I would like to add another layer, using another shape file. So I used JFileDataStoreChooser to select another shape file and ...
1
vote
1answer
33 views

Unable to get the feature collection data while exporting as kml file

I am trying to get the kml file by giving simple polygon data but not able get exact kml Please suggest me if iam wrong. code snippet: GeometryFactory geometryFactory = JTSFactoryFinder....
1
vote
1answer
15 views

Getting the feature information under the mouse (geotools)

I'm interested in programmatically finding out information of the the features (of a map) under the mouse. I'm using geotools for drawing the map using a shape file. I've first used the following code ...
1
vote
1answer
36 views

How to embed a GeoTools map in a existing java swing application

I have a java GUI swing application with three frames. I want to load a map from a shape file and draw the map on an existing application frame. For this I use GeoTools framework. I've looked at the ...
2
votes
1answer
37 views

Geotools produces different GEOGCS value for ESRI WKT

ArcMap creates following contents in .prj file for WGS 84. GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0....