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

learn more… | top users | synonyms

3
votes
2answers
462 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 ...
1
vote
0answers
9 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: ...
1
vote
2answers
203 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
20 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 = ...
0
votes
0answers
17 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. ...
3
votes
1answer
516 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 ...
4
votes
1answer
714 views

How to sort a SimpleFeatureCollection using GeoTools?

I have a featurecollection: SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(dbFeatureType); SimpleFeatureCollection collection = FeatureCollections.newCollection(); while ...
0
votes
1answer
476 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 ...
2
votes
1answer
14 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
1answer
275 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 ...
1
vote
0answers
292 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
54 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
22 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
50 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
40 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
16 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
175 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", ...
0
votes
1answer
256 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 ...
0
votes
1answer
28 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
130 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 ...
2
votes
1answer
13 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
344 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
43 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
14 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 ...
0
votes
1answer
281 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?
1
vote
1answer
35 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
12 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
120 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
13 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
60 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 ...
0
votes
1answer
19 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 ...
0
votes
2answers
27 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
10 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
10 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
30 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
32 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 = ...
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
31 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
25 views

Geotools produces different GEOGCS value for ESRI WKT

ArcMap creates following contents in .prj file for WGS 84. ...
2
votes
0answers
274 views

How to prevent an IllegalArgumentException with GeoTools WFS GetFeature request?

I want to retrieve the feature Collection from a WFS server with the java library GeoTools. I tried this code, but unfortunately the program fails to execute. public class App { public static void ...
2
votes
2answers
118 views

Can I use “Web Map Service Module” and “Web Feature Service Module” of Geoserver in my project?

I'm developing a GIS application with java Spring Framework and GeoTools library. I have some vector layer. I want to get this layers with wms and wfs protocols. I've downloaded geoserver code. It ...
1
vote
1answer
31 views

CRS problems with SwtMapPane

I'm quite new to geotools and I'm trying to get to grips with it. Trying to load some shapefiles (see attachment) into a MapContent which in turn is associated with a SwtMapPane I always get an ...
1
vote
1answer
55 views

How to insert raster in PostGIS from java JDBC

I have been looking for a solution to store dynamically generated raster data into PostGIS from java and PostGIS JDBC. I am working with geotools toolkit but i am unable to find any documentation ...
0
votes
0answers
62 views

Print a map with Geotools

I want to print a map with a raster image as base-map using Geotools. The problem is that the raster image doesn't take the margins into consideration and starts always at the point (0,0) as you can ...
7
votes
2answers
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 ...
1
vote
2answers
57 views

Extract border polygon from a geometry

I am wondering if there is a way, algorithm, tools, to create, from a geometry, another one that is the border with a certain thickness. The idea is to get something similar to that : This looks ...
0
votes
1answer
59 views

KML 2.2 parsing with a group of point Geotools

I am doing a viewer with geotools and I am trying to read a kml file. I am using PullParser class for parsing and also I am using KML and KMLConfiguration classes from org.geotools.kml.v22 package. If ...
5
votes
2answers
6k views

How to parse KML data using geotools?

Geotools contains some packages dealing with KML: org.geotools.kml and org.geotools.kml.bindings. I assume it was designed to parse KML data. Do you know how to use it?
1
vote
1answer
85 views

Reverse Geocode latitude longitude with Geotools using Natural Earth Shapefiles in Java

I am trying to perform reverse geocoding in Java using GeoTools and Natural Earth Shapefiles. I just want to pass latitude longitude and get the corresponding country name + state name. I have ...
1
vote
0answers
86 views

Performance Scanning Big Rasters in GeoTIFF Format? [closed]

I am scanning large rasters in GeoTIFF format. The size is around 30GB and there is only one band. I'm using geotools to do that. I did some experiments on scanning the whole raster to find the best ...