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

learn more… | top users | synonyms

4
votes
0answers
266 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 ...
3
votes
0answers
90 views

Filtered SimpleFeatureCollection really slow on Map and other operations

I'm working with a shapefile having about 85.000 features. I need to select some of these using a filter and then showing these on a map. Now... If I draw the entire shapefile's features the creation ...
3
votes
0answers
76 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. ...
3
votes
0answers
485 views

What is the best way to convert WKT String to GML String

What is the best way to programatically convert WKT String to GML String? Every reasonable library (at best available in some Maven repository) can be used. Till now I came up with this solution ...
3
votes
0answers
196 views

Illegal argument exception while reading tiff image using GeoTools

I am working on a Java swings based GIS application to project my tiff image as maps . But each time I run my application I get Illegal argument: "semiMajorAxis=�" . The tiff images I have are working ...
3
votes
0answers
161 views

Is there a way to create raster by interpolating point values using GeoTools 8.2?

im new in using GeoTools (8.2). I was able to create shp from asc file which contains my data. Now my question is is there a simple way to create (interpolate) a simple shapefile (only points) to ...
3
votes
0answers
456 views

How to sort a SimpleFeatureCollection using GeoTools?

I have a featurecollection: SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(dbFeatureType); SimpleFeatureCollection collection = FeatureCollections.newCollection(); while ...
3
votes
0answers
234 views

Symbolizer with external GIF image is not rendered pixel-perfect

We want to pinpoint some locations on a map with some external GIF symbolizers. The issue we have is visible in the attached image*: looks like somethings happens on a sub-pixel level, so that the ...
3
votes
0answers
258 views

How to get distinct values from multiple columns in GeoTools?

Is there a way to get distinct values from multiple columns in geotools? I know I can get unique values from a column like this: SimpleFeatureSource featureSource = ...
2
votes
0answers
30 views

Geotools wfs getFeature

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
0answers
22 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, ...
2
votes
0answers
163 views

How to convert shp to csv

I am trying to convert my shape files to csv through a batch processing in Java using Geotools. The problem is I have more than 500 shape files (point features). The code is working fine for a small ...
2
votes
0answers
36 views

Ortholines in GeoTools

I am using GeoTools 10.7 to generate a map with decorations in my Java application. One of the feature I need in the map is to display ortholines both latitude and longitude. The lines will need to be ...
2
votes
0answers
450 views

Building java based desktop map application using embedded database such as spatialite

I am relatively very new to building GIS based applications and have a very limited understanding in this area. So I need some help in building a java based desktop application which would generate ...
2
votes
0answers
328 views

How to create SLD with inline features and style and add to WMS using GeoTools?

I am trying to create labels with arbitrary values on a WMS map using GeoTools (9.4). I have created a feature type, a feature (in a data store), and a user layer. With that I generated an SLD ...
2
votes
0answers
134 views

What is the relation between geotools and hibernate-spatial ( differences and similarities)

I know that hibernate-sapatial is supposed to be an abstraction for the db . And from what i understand there is some kind of possibillity to do that with geotools? ( to what extent i do not know). ...
2
votes
0answers
269 views

Implement a WFS Server using Geo tools

I need to implement a WFS Server using Geo tools, I have an application developed in Java using a spatial database. I wish to develop a WFS service using GeoTools. As a first step, I am implementing ...
2
votes
0answers
502 views

Geotools, output to kml and convert meters

I have a complex problem. I'm using geotools 10.* I have input data: latitude, longitude (WGS_84), radius in meters, start angle (12 o'clock), end angle (clockwise, i.e. turn to the right). I need ...
2
votes
0answers
376 views

How to open image file saved with JAI in Geotools?

I need to find NDVI and other vegetation indices and then find changes in time with tif images. I've been using Geotools for this. I took 2 tiff images, then using QGIS I changed them to PNG because ...
2
votes
0answers
327 views

create geotiff from shapefiles

I need to colorized geometries from shapefiles and convert them to raster image (geotiff). I tried to use geotools's VectorToRasterProcess and ImageWorker ("d:\gis\tmp\32 27 25 w4.shp" is path to my ...
2
votes
0answers
350 views

Getting DataStore Problem with Geotools

I recently found an issue with Geotools and getting the datastore for a shapefile. If I try: FileDataStore dataStore = FileDataStoreFinder.getDataStore(file); -or- Map connect = new HashMap(); ...
2
votes
0answers
113 views

GeoTools, add column in query with CQL

I'm trying to query the database (DataStore) and want to let the datastore calculate a value for me. In SQL I would do it like this: SELECT name, ST_Area(ST_Intersection(the_geom, ....) AS myValue ...
2
votes
0answers
86 views

MultiPolygon from database

I would like to know how to create an instance of a Multipoint from a PostGIS database.. I do the query , then got the ResultSet named "area" , the column with MultiPolygon attributes is named "geom" ...
2
votes
0answers
131 views

Geotools throws “Cannot encode multilinestring (yet)” while Shape import on Linux

I've encountered a strange platform-dependent SHP import problem. Everything works fine on Windows, shape files are converted fine to database. There is although small little warning: [[ACTIVE] ...
2
votes
0answers
252 views

How to programatically add KML Icons to Placemark generated from SimpleFeatures using GeoTools?

I have successfully generated a set of (unstyled) placemarks in a KML file using the GeoTools framework, and the Encoder class. The file renders fine in Google Earth with standard balloon placemarks. ...
2
votes
0answers
293 views

GeoTiff specs for coordinate transformation definition

I would like to define a GeoTiff coordinate transformation by a set of GCPs only. The intention is to publish the GeoTiff as a coverage in GeoServer. However if I specify tie points only, GeoServer ...
1
vote
0answers
19 views

Projecting all the points from the csv file at (0,0) in a map

I am trying to plot some points on a map using the geotools tutorial (http://docs.geotools.org/stable/tutorials/feature/csv2shp.html). Unexpectedly all the points given in the .csv file are being ...
1
vote
0answers
94 views

Converting geometry to geography using org.geotools.geometry.jts.JTS

I'm trying to convert com.vividsolutions.jts.geom.Geometry to geography, using the GeoTools package - org.geotools.geometry.jts.JTS. This is my code: public Geometry getGeography() { Geometry geo ...
1
vote
0answers
186 views

how to publish the layer from Mongodb store in geoserver?

I am using geoserver 2.5 MongoDb 2.4 Windows 7 64bit I am imported json data file into MongoDb using the below query. mongoimport --db GeoMongodb --collection states --file E:/states.json ...
1
vote
0answers
168 views

GeoTools: SimpleFeatureCollection to KML error CoordinateReferenceSystem

I want to export a SimpleFeatureCollection (Read from a MySQL DB) to a KML file, here is my code used to read the infos into the console: private void featureCollectionToKML(SimpleFeatureCollection ...
1
vote
0answers
104 views

Csv To Shape Error

I have found a usefull tool to convert csv files into shape files with geotools: http : // docs.geotools.org/latest/userguide/tutorial/feature/csv2shp.html#create-a-shapefile-from-a-featurecollection ...
1
vote
0answers
143 views

How to retrieve latitude/longitude from Tiff with Geotools

I am new to Geotools and I have to work on project which includes a set of tiff image maps. In that I need to get latitude/longitude for a given point. Ex: When mouse click occurs I want to get the ...
1
vote
0answers
187 views

GeoTools example for Shapefile export to already existing PostGIS table

I'm a newbie to GeoTool API, and I'm looking for a way to export the specific shapefile to the specific already existing PostGIS table with GeoTools (the underlying problem I face is that PostGIS ...
1
vote
0answers
45 views

CRS centered on the 180 meridian?

The problem I'm dealing with is the old 180 meridian problem, except I'm not trying to plot or render shapes that cross it, I need to do intersections of lines that cross it. The only spherical ...
1
vote
0answers
186 views

Renaming Columns in Geotools FeatureType

I am attempting to build a simple java program that loads shapefiles into a Postgis 2.0 database. Everything is working out great except that I would like to be able to modify the FeatureType in the ...
1
vote
0answers
267 views

how to create a shapefile for 2 million points with geotools

I have to create a shapefile with the geotools java library for approx. 2 000 000 points and whatever strategy I apply I seem to run into out of memory exceptions as well as everything running super ...
1
vote
0answers
64 views

Visual edit geographic data with geotools

With JMapFrame I have options for to visualize my geographic datas, but I don´t know how to add tools for to edit this data, equals conventional GIS. It´s possible to do this? att, Augusto
1
vote
0answers
448 views

Create a color scale/legend for choropleth map using geotools (or other open source Java library)?

I'm experimenting with choropleth maps using geotools. Is there an easy way to add a color scale to the map (using geotools itself or some other os library)? By a color scale I mean a bar that shows ...
1
vote
0answers
230 views

How to handle multipoint symbology catalogue (as in mil2525c, tactical graphics appendix b)

Is there a general format (standards based) to store a vector based drawing description for multipoint symbology (means having several anchor points reflecting symbol point <-> geographic point ...
1
vote
0answers
153 views

Get centroid of SimpleFeatures in GeoTools8

I've got some SimpleFeatureCollections and now I want to get the Centroid of every SimpleFeature in the collection. Unfortunally I've only found a centroid method for Geometry. Is there any way to ...
0
votes
0answers
3 views

Why does this Geotools Java reprojection to WGS-84/4326 cause offset?

I am using the block of code below. I am reading in a geotif with a UTM zone projection and converting it to 4326. I am pulling out certain multiband values and creating a new raster, when I plot the ...
0
votes
0answers
5 views

Problems resampling and displaying grid coverages with EPSG 27200 <-> 2193

What is wrong with this code? Given a BufferedImage , a world file and a coordinate system I construct a code coverage as follows: Rectangle actualDim = new Rectangle(0, 0, ...
0
votes
0answers
9 views

How do I get new world file parameters from a resampled grid coverage?

I have a grid coverage that I resample (reproject) and I would like to find out what the new matrix coefficients that would be outputted to a world file. How do I find them?
0
votes
0answers
108 views

Geotools shapefile and geotiff displaying problem in JMapPane

I'm trying to get a JMapPane to show up in a JPanel, but without success. Below is the JPanel instance containing the map. I am importing a geotiff and a shapefile layered in that order. Not only does ...
0
votes
0answers
23 views

Parsing GML results in empty FeatureCollection

I am issuing a call to a WMS to get feature information. <?xml version="1.0" encoding="UTF-8"?> <wfs:FeatureCollection xmlns="http://www.opengis.net/wfs" ...
0
votes
0answers
26 views

Exporting a shapefile with geodetic values in geotools

I have collections of polygon features. Each point in a polygon has local cooridantes (x y values) and geodetic Coordinates (latitude and longitude in decimal degree) i can easily export the shape ...
0
votes
0answers
24 views

Create a point on a map using geotools

public class GeotoolsFxTest extends Application { Group root = new Group(); Group map1 = new Group(); Group map = new Group(); Group texts = new Group(); Scene scene; private double dragBaseX, ...
0
votes
0answers
39 views

Is there a way to retrieve/query country data from a shapefile programmatically using map coordinates in GeoTools?

I am using Geotools to parse and draw a shapefile. Now; when I draw that map I receive coordinates with this bit of code for my Flight Line button. void selectFeatures(MapMouseEvent ev) { ...
0
votes
0answers
93 views

Splitting multiple polygons with a line in JTS geotools

i am using geotools as my GIS map solution. now i want to split multiple polygons to build a road or river. passing through multiple polygons so, can you plz help me how to do this splitting a single ...
0
votes
0answers
12 views

Display coordinate references in Geotools

I'm using this library to finish my final project and i have to say I'm no familiar with the maps worlds. My question is if geotools has a method to show automatically the coordinates references in ...