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

learn more… | top users | synonyms

1
vote
0answers
66 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
23 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
42 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
14 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
16 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
51 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
35 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
16 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
52 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
43 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....
2
votes
0answers
305 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
136 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
37 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
86 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
83 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
82 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
98 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
7k 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
127 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
87 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
56 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
191 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
279 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
42 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 xmlns="http://www.meteogroup-...
0
votes
1answer
71 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 ...
0
votes
0answers
100 views

Saving shapefile using GeoTools?

This is my first time dealing with the GeoTools library and not sure how to troubleshoot the issue. I am trying to save a shape file using the library but I get the following stack trace: java.lang....
1
vote
1answer
348 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 ...
0
votes
0answers
63 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 ...
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 ...
0
votes
0answers
40 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
83 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 double[]{2/...
3
votes
2answers
148 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
227 views

How to get the LineStrings from a MultiLineString

I was wondering if there is a way I can extract the LineStrings from a MultiLinestring object. What I am really trying to do is look into a MultiLineString and see if I have a certain LineString. I ...
4
votes
3answers
4k views

converting/parsing geojson into com.vividsolutions.jts geometry

Does any has any experience with converting string geojson into com.vividsolutions.jts geometry object (point, polygon, etc). Maybe there is some java library I cannot find. Greets!
0
votes
0answers
210 views

How to convert world coordinates to screen coordinates (pixels)

I am trying to export and display an SVG file, the exporting works, I even added some custom grouping. However the image is either not displayed at all or not displayed properly (very small and lines ...
2
votes
0answers
55 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
25 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 ...
1
vote
1answer
163 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
40 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"]], ...
0
votes
0answers
71 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; ...
0
votes
1answer
331 views

overriding showMap

This code is not working as needed. I need just to make a window with addlayer button. import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import ...
1
vote
0answers
188 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
302 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
19 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 = CommonFactoryFinder....
2
votes
1answer
204 views

Bad calculations with Colombian projection (EPSG:3116) in GeoTools?

Solved, reading mail-archive I can understand that there is a conflict between: gt-epsg-wkt-9.2.jar gt-epsg-hsql-9.2.jar I tested removing each one, with 'hsql' I get the same wrong result, but ...
1
vote
0answers
46 views

Create a Geotiff with different colors

I have a geotiff raster image. I have estracted the WritableRaster, the envelope, and the gridsampleDimension I need to create a new geotiff using Geotools. GridCoverageFactory gcf = new ...
0
votes
0answers
64 views

Change color of feature by ID (GeoTools)

I am trying to change the color of a specific object, by ID (or another feature). Currently I am able to extract data about an shapefile and display that data. However, I want to be able to change the ...