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

learn more… | top users | synonyms

1
vote
1answer
21 views

Missing class org.geotools.util.Version

Full story below, but essentially I'm trying to use Geoserver and it needs the class org.geotools.util.Version, but it can't find it even though I can see it's in the appropriate jar file. Something ...
1
vote
1answer
80 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 ...
2
votes
1answer
15 views

Extracting data from Natural Earth using GeoTools java class?

I wrote a small java class to extract country boundaries from naturalearthdata.com data. My problem is that the coordinates do not match with OSM map, the whole polygon is shifted... e.g. according to ...
1
vote
1answer
22 views

How to display additional features

In my application I have a gis file to render an (java BufferedImage) image of countries with geotools which is sent directly to the browser. The colours of the countries (plus name and additional ...
2
votes
0answers
40 views

How to read each pixel of each band of a multiband GeoTiff with GeoTools Java

I am new to working with Raster in GeoTools-very experienced in java. My goal is to read in a geotiff that has multiple bands, then create a HashMap for each pixel, where the key is simply the lat/lon ...
2
votes
1answer
119 views

Geotools 8.4 CRS.decode invalid(?) reference to HTTP_URI_OGC

I'm trying to do a simple CRS.decode to lookup a CoordinateReference system: E.g. CoordinateReferenceSystem target_crs = CRS.decode("EPSG:4326"); However this fails with a reference to the ...
1
vote
1answer
227 views

Version problems with Geotools CSV2SHP example

I'm trying to use the CSV2SHP tutorial. I spent some time trying to get it to run but using v10.x of Geotools causes the shapefile to be output with no geometries. For instance if I open it in QGIS, ...
0
votes
2answers
255 views

Geotools writing shapefiles without geometries [duplicate]

When I am writing a shapefile according to CSV2SHP tutorial, it contains features without geometries. I use version 10-SNAPSHOT. For example the result of ogrinfo looks like below: D:\>ogrinfo ...
1
vote
1answer
41 views

Displaying 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 ...
0
votes
0answers
21 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
14 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 ...
1
vote
1answer
30 views

Test for polygon orientation

I'm want to merge multiple geometries with Geotools (starting off with one geometry) but the result is a polygon that has a clockwise orientation. This gives a invalid geometry. My code for the merge: ...
0
votes
0answers
7 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 ...
0
votes
0answers
125 views

Add labels for printed map (GeoTools)

I have some problems with labels for printing map with GeoTools. Next code (with some cuts, code on Scala language) can help me for printing map: val map = new MapContent() val parser = new ...
0
votes
0answers
24 views

Drawing Line on existant Shapefile in Geotools

I have a shapefile that is opened and looks as such: Now I am attempting to draw a line from two points I click on that map; however the code they give for the QuickStart.java example is ...
1
vote
1answer
95 views

GeoTools 10 - Convert Raster To Vector

I am fairly green with GeoTools, and having a hard time converting a raster (GridCoverage2D) into a vector format. In the hours I've spent searching this site and Google, there seems to be multiple ...
2
votes
1answer
91 views

Add features to main SDE Table with geotools

Sorry for my english, I hope you can understand ;) I'am using geotools 8.4 version. I try to copy all features from SDE Table(TEST.DBO.MM_SOURCE) to another SDE Table(TEST.DBO.MM_TEST). All features ...
0
votes
1answer
104 views

I nead to find the nearest places based on latitude/longitude points

I have a java aplication backed by a mysql database which contains events with locations (latitude/longitude), the location data is saved as POINT data type. I nead to find the nearest events in some ...
0
votes
1answer
17 views

how can we convert vector data to raster data in geotools

In my project iam able to open and save shape file. I want to convert this vector data to image format as a tiffimage plese help me the procedure to do the same.
1
vote
0answers
173 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 ...
0
votes
0answers
22 views

Geotool SwtMapPane draws in view but not in TitleAreDialog

I've written a very basic rcp app to show points and lines in a view. When I tried to move this code to a wizard page, it gave the error below. When I use code that simply loads and displays a ...
0
votes
1answer
35 views

A simple geotool app example

I've been playing around with the GeoTools libraries, but I can only show shape files and no custom layers. Requirements are that it must use the SWTMapPane and not via the static ...
2
votes
1answer
121 views

Create image (TIFF/PNG) from geodetic (lat/long) data

Using Java, I need to render a bunch of geodetic data to an image, ideally TIFF or PNG. Specifically this is weather data, with each sample having a latitude, longitude, and amplitude value. I'd like ...
1
vote
1answer
71 views

Transactions in Geoserver / WFS - Is it possible to know which “action” failed?

I'm trying to implement transactions for some queries to Geoserver. I'm using plain HTTP Post to make the requests, from Java. One of those queries looks something like : <wfs:Transaction ...
0
votes
1answer
57 views

Opening shapefiles with geotools

Trying to make a simple class that will read shapefiles and eventually be able to pull out the coordinates/attributes for each feature (working with points here). But can't quite figure out geotools. ...
1
vote
1answer
24 views

Problem Inserting feature with Geotools WFS

With this tutorial http://docs.codehaus.org/display/GEOTOOLS/Data+Writing When I try to insert a feature try { DataStore geoToolsClient = getGeoToolsClient(); Transaction transaction = new ...
1
vote
1answer
41 views

Can I define a transformation between 2D and 3D in Geotools?

I'm using Geotools, and I need to convert coordinates between 2D and 3D coordinate reference systems. I recognize that there's no universally-correct way to do this: 2D -> 3D means "making up" a Z ...
4
votes
2answers
84 views

How do I construct (or select) an appropriate local Cartesian coordinate system, for an arbitrary small area?

I'm relatively inexperienced with coordinate reference systems, so please bear with me if I'm not putting this clearly. I have existing software which works with an abstract (un-referenced) 3D ...
2
votes
1answer
35 views

Creation of tiled grid in JAVA with geotols

I am trying to create a grid using GeoTools in JAVA, covering specyfic area with resolution 50 m (distance between two points). To do so I have two points: the most nortwestern (let's call it NW) and ...
1
vote
0answers
40 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 ...
2
votes
1answer
19 views

Where are descriptions of attributes in datafiles on naturalearthdata.com?

I have downloaded some datafiles from naturalearthdata.com site. For example, ne_50m_admin_0_countries feature source contains dozenz of attributes with names like scalerank, level, mapcolor7, ...
0
votes
0answers
56 views

Java GeoTools - Getting CRS from SRID

I might confuse between two things, but I need to do some calculation on my polygons (distance, area etc.). Using the WKBReader, I'm getting the geo: WKBReader wkbReader = new WKBReader(); byte[] a = ...
2
votes
1answer
42 views

Bad calculations with Colombian projection (EPSG:3116)

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
90 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 ...
0
votes
0answers
19 views

Creating visualizations for geometry points with geotools

I am a beginner in everything that involves GIS coding and so on. After doing some research i chose Geotools as the tool to help me with my project. Basically i will need to create a new routing ...
0
votes
1answer
36 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
2answers
91 views

Conversion of point grid to a raster with open source tools (Gdal, QGIS …)

I'm looking to do something which seem simple to me, but I haven't found a solution since 2 days I looked for. I've got a Postgis DB with lot of points (WGS84) spaced of 100 meters which cover a ...
0
votes
0answers
45 views

Calculating scale from tiles using their envelope

I have a few problems I need to solve, and it comes down the the below example. It may be my understanding or the way I am doing it. Can someone please explain why my logic does not work. I am ...
1
vote
1answer
45 views

How to check for overlapping check with tolerance using JTS / GeoTools

I have several hundered polygons which may overlap but need to be considered 'not overlapping' when the overlapping is less than 1 meter. The overlapping check in JTS does not offer a tolerance ...
0
votes
0answers
35 views

autocomplete polygon function with geotools

i'm using geotools to develop some GIS features, i don't know how to implement the autocomplete polygon function using Java code. does any one tried to do it before?
1
vote
1answer
180 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
1answer
41 views

How to create a value-by-alpha map in Java?

Someone has post similar question as mine before : similar question But my objective is slightly different. I have a shape file (.shp) (a country map) I would like to write a piece of java code to ...
2
votes
1answer
139 views

geotools parsing kml with multigeometry only gives me first geometry

I'm trying to parse the states.kml file (http://docs.geotools.org/latest/userguide/_downloads/states.kml) on the geotools website using the following code: Parser parser = new Parser(new ...
0
votes
0answers
113 views

How to make a geo reference image using GeoTool based on a matrix mapped data?

My ultimate objective is to make a geo reference image and make it as a raster layer to overlay the image above my openlayers map. I have a set of geo coordinate data, and each coordinate is assigned ...
0
votes
1answer
57 views

How to divide streets layer into 2 mile segments. [duplicate]

I have a streets layer which I want to divide into 2 mile segments. I have searched and read enough for days but there is no information on how to do this. The split command allows you to select and ...
0
votes
2answers
116 views

Latlng to UTM conversion with forced zone

I'm trying to convert a set of latlng coords to UTM but the points in the set are across two different UTM zones, 32T and 33T. This causes two near points like 44.51601173544275, 11.992860160820502 ...
2
votes
1answer
101 views

Why is my longitude conversion from NY State Plane Coordinate System to WGS84 consistently off by 3.665 degrees?

I'm trying to convert coordinates from the NY State Plane Coordinate System for Long Island (zone #3104) to WGS84 using the GeoTools Java API. The latitude value is correct, but the longitude is ...
1
vote
1answer
41 views

Upgrading GeoTools

Currently we are using geotools release version 2.7.5. I checked the versioning of geotools and found that, there is a stable release version 8.* directly after 2.7.*. Do the new release ...
5
votes
1answer
394 views

What is the unit of measurement for buffer calculation?

What is the unit of measurement used by Geometry class for it's buffer calculation ? Api doc currently defines it as " distance - the width of the buffer (may be positive, negative or 0)" I need to ...
1
vote
1answer
86 views

Buffer Zip Region Polygon with GeoTools

What I want to achieve is to buffer a zip region geometry with a distance in meters and than get the coordinates of the new (expanded) polygon. The original geometry polygon is parsed from a kml file. ...