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

learn more… | top users | synonyms

-1
votes
1answer
14 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
11 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
15 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 ...
0
votes
0answers
33 views

Create shape with several features from vector layer [on hold]

In Geotools 12.3 when I export a vector layer to shape, it exports well when it has one feature (exporting .dbf, .fix. prj and .shp), but when the layer has more features the export process doesn't ...
1
vote
1answer
35 views

Parsing and rendering JSON data in Java with GeoTools

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
11 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
33 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 ...
2
votes
1answer
11 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 ...
3
votes
1answer
28 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
12 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
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
0answers
11 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
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(); ...
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 ...
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
26 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
22 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
11 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
24 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
24 views

Geotools produces different GEOGCS value for ESRI WKT

ArcMap creates following contents in .prj file for WGS 84. ...
0
votes
0answers
50 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 ...
1
vote
1answer
48 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 ...
1
vote
2answers
40 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
40 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 ...
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 ...
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 ...
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 ...
0
votes
1answer
39 views

Geotools filterfactory not found exception

Can anyone help me out of this exception. In a geotools query program i am using Filter filter = CQL.toFilter("CONTAINS(the_geom,POINT(-115.56,67.567))"); and when am running the program using ...
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. ...
0
votes
0answers
30 views

geotools shapefile does not support utf-8 for dbf header

I create a ShapefileDataStore to create a new shapefile and call dataStore.createSchema(...) . But it does not work for utf-8 header fields. I checked the geotools source code and realized that it ...
1
vote
1answer
204 views

Plot the longitude and latitudes on map using geotools

I am new to geotools and i find bit difficult to plot a point using the latitude and longitude values. can any one help me out to solve my problem. I tried the following code but not helpful.By ...
2
votes
2answers
41 views

How to convert bbox when importing GeoTIFF with Geotools?

Here is my code: String EPSG4326 = "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS ...
0
votes
0answers
7 views

geotools-13.5 not writing geometry in shapefile [duplicate]

I am using geotools 13.5 to create shape file and followed guidelines from post : http://docs.geotools.org/stable/tutorials/feature/csv2shp.html Since I am trying to create "Line" feature, I have ...
1
vote
2answers
106 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 ...
0
votes
0answers
32 views

Add raster layer or a WMS using geotools - problem to run the jar file from cmd

I am using geotools in order to develop a custom GIS. So, i tried to add a raster layer and a WMS based on the tutorials given by geotools. When i am running the project using the main class in ...
0
votes
2answers
78 views

Image is black and white after multiply by a constant

Below is my code AbstractGridCoverage2DReader reader = null; try { reader = new GeoTiffReader(new File(path1)); Coverage cov1 = reader.read(null ); double[] v1 = new ...
0
votes
1answer
64 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 ...
3
votes
2answers
116 views

Reading Lambert Conformal Conic NetCDF into GeoServer?

I'm working on reading in a NetCDF file into GeoServer and GeoServer has no problem reading it in as a data store, but when I go to publish the layer from the data store I get an error that states ...
1
vote
2answers
135 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
46 views

What are the geotiff limitations of geotools?

I'm trying to process globcover, which is a .tif file of 374mb. Running the following code: File tiffFile = new File("C:\\Users\\CAA\\Desktop\\test.tif"); GeoTiffReader reader = new ...
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
22 views

Comparing Coordinate Reference Systems in GeoTools

This seems like a pretty silly problem. I'm using a Maven build with GeoTools 14.0. All I want is to compare CRSs with flexibility so that it doesn't have to be exactly equal as long as all the ...
0
votes
0answers
34 views

Axis order in user Shapefile

I have a shapefile which has the following PRJ GEOGCS["WGS 84", DATUM["World Geodetic System 1984", SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], ...
1
vote
1answer
93 views

Problem with downloading dependencies gt-epsg-hsql

Few days ago I started training with maven repository on www.geotools.org. Right now I have a problem with downloading dependencies gt-epsg-hsql. My Eclipse tell me that kind of Error "Offline/Missing ...
0
votes
0answers
54 views

Can't read GeometryCollection from Json String with java 8

I've got a problem with geotools and Java 8: since I started working with it, GeometryJSON can't read jts GeometryCollection from a Json String. Here an example: import java.io.ByteArrayInputStream; ...
1
vote
0answers
115 views

GeoTools: Lambert72 to WGS84

I am trying to convert coordinates (and polygons from com.vividsolutions.jts.geom) in Lambert72 (EPSG:31370) to WGS84 (or the other way around). I'm using the org.geotools.referencing CRS and ...
2
votes
1answer
182 views

Java library to break up a big polygon into many parts

I need to break up large polygons like these into smaller manageable pieces that can be stored in my DB. I tried searching for tools to do this and mostly come across using software such as ArcGIS or ...
1
vote
0answers
17 views

GeoTools FeatureCollection to Filter (make Filter from a FeatureCollection)

I have a FeatureCollection and I want to make a Filter of them. One way is that I may use FilterFactory#id(Set<Identifier> set) to make a filter. FilterFactory ff = ...