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

learn more… | top users | synonyms

-1
votes
0answers
12 views

I want to build GIS based java application that runs on browse

I am developing one GIS application in java, for that I am using OpenMap and GeoTools libraries(alternatively). These libraries are giving me a frame or say a standalone application, but what I ...
-1
votes
0answers
7 views

For geoserver what is the model name class used for single band monochrome in a geotiff? [on hold]

I am reading a single band 16-bit monochrome geotiff from usgs geotiff. When a call is made to image.getColorModel what instance type should I expect? I am guessing IndexColorModel or ComponentModel ...
2
votes
1answer
70 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
27 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 ...
2
votes
1answer
302 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
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 ...
1
vote
1answer
147 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); ...
0
votes
1answer
15 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
1answer
379 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 ...
0
votes
0answers
67 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: ...
1
vote
1answer
45 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
12 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 ...
2
votes
2answers
26 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
4 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 ...
2
votes
2answers
358 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
231 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 ...
0
votes
1answer
246 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
185 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
1answer
50 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
23 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
71 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
41 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
78 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
138 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
3k 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!
1
vote
2answers
56 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 ...
0
votes
0answers
107 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
35 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 ...
0
votes
0answers
11 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
17 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
46 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
29 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
35 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
274 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
63 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
65 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
12 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 = ...
2
votes
1answer
175 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
26 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
31 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 ...
1
vote
0answers
47 views

Error on Map Style Tutorial

Trying to follow the Map Style tutorial, as the functionality of changing color of objects selected is one thing I am trying to add to my project. However, after running the code from the tutorial I ...
1
vote
0answers
20 views

Error in: org.geotools.swing.MapLayerTableCellRenderer.getListCellRendererComponent

Getting this error while exporting an shapefile to svg (courtesy to iant): The weird thing is I wasn't getting this error before, but I just suddenly starting getting it after running my application, ...
2
votes
0answers
97 views

GeoServer: `org.geotools.process.raster.AffineProcess` could not be instantiated, how to fix?

I have installed GeoServer from OpenGeo Suite 4.1 on a fresh Unbuntu 12.04 following Boundless instructions. Now I wanted to test geoscript-groovy, and installed groovy, geoscript-groovy-1.3.1, ...
1
vote
0answers
23 views

Export shapefile layers to svg [closed]

I have an application that exports an SVG after reading in a shapefile (thanks to iant for the exporting bit). You can view the code here: Exporting Shapefile to SVG using Java & GeoTools? What ...
1
vote
0answers
24 views

Casting problem at CSWClientDemo of geotoolkit

I tried to test CSWClientDemo of geotoolkit but couldn't succeed. Here is a casting problem: GetRecordsResponseType response = ((JAXBElement<GetRecordsResponseType>) ...
0
votes
0answers
44 views

GeoTools and JavaFX?

I am using geotools with the swing library in order to develop a GIS application. I would like to ask if there is a possibility to use JavaFX library instead of swing library? Unfortunately, i ...
3
votes
1answer
169 views

Exporting Shapefile to SVG using Java & GeoTools?

I am currently working on how to read in ESRI shapefiles, parse/edit layers and then export out to SVG (Scalable Vector Graphic) file type. I have been using GeoTools primarily for reading/loading ...
3
votes
1answer
65 views

Difference between Envelope and BoundingBox

As you know GeoTools uses OpenGIS declared APIs; BoundingBox and Envelope for example. picture from geotools docs. BoundingBox Represents a two-dimensional envelope. This interface ...
2
votes
1answer
68 views

Small GeoTiff of the world very slow when zoomed in to city level

I'm new to GeoTools and as a start I'm trying to display a small GeoTiff file on a map . The GeoTiff files I'm using are under 10MB (for example a 1MB file at 720x360 pixels) and covers the entire ...
4
votes
0answers
316 views

Can GeoTools parse GML CRS definitions?

A kind of branching of this question. Soon I will need to handle GML Coordinate Reference Sysyem definitions in a Java servlet. Links: GML OGC reference. Concrete example. I know that GeoTools ...