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

learn more… | top users | synonyms

1
vote
0answers
275 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
41 views

Parsing and rendering JSON data in Java with GeoTools

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
18 views

Getting started with Geotools? [on hold]

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
38 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
21 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
12 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
168 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
243 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
12 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
128 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
12 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
304 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
29 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
13 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
272 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
34 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
107 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
12 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
58 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
16 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
23 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 ...
3
votes
1answer
470 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 ...
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
9 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
24 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
27 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 = ...
3
votes
2answers
442 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
1answer
12 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 ...
0
votes
1answer
458 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
26 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
265 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 ...
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
264 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
116 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
27 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
49 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
53 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
42 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
41 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
77 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
84 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 ...
1
vote
1answer
1k views

Geotools create/save shapefile has no geometry information

When I create and save a shapefile in GeoTools, then open it in ArcGIS or QGIS, it doesn't show up on the map, even though the features are there in the attribute table (and all attributes I added ...
2
votes
1answer
28 views

(Geotools) Get 2 Selected Layer out of the MapTableLayer

I have a Method that calculates the Area of 2 Layers of different topologic Relations, which needs 2 collections. In the Button where I use this method, I want to get just 2 of the selected Layers in ...
8
votes
1answer
178 views

Why are date vaules displaying a trailing 'Z' when layers are published with Geoserver and a PostGIS data store?

I have published various layers using Geoserver 2.2.x with a PostGIS 2.0.1 (PostgreSQL 9.1.x) data store. Fields that only have date values and not time/timestamp related values are stored as date. ...
2
votes
1answer
136 views

Unable to transform from EPSG:3857 to UTM in Geotools

I'm using Geotools to perform some transformations between coordinate reference systems. I created a proof of concept taking data from Google Earth, which uses ESPG:4326, and converting it to UTM. ...
2
votes
0answers
38 views

GridCoverage2DReader not reading 16 bit grayscale?

I have a geotiff that has 16-bit gray scale pixels and GridCoverage2DReader instance only returns the nodata value. Yet both QGIS and uDig show the image and I see WGS 84 and EPSG:4326 for the geotiff ...
3
votes
2answers
2k views

Programmatically converting arbitrary XML data to shapefile?

Based on the answers below I decided to do some programming. I'll be using GEOtools for this, a java lib: http://www.geotools.org/ I have the following XML: <shapes ...