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

learn more… | top users | synonyms

1
vote
1answer
84 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
138 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 ...
3
votes
1answer
75 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
105 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
29 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
104 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
69 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
208 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
30 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
105 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?
2
votes
2answers
334 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
71 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 ...
0
votes
0answers
43 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
80 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 ...
3
votes
1answer
582 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
1answer
66 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
209 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
211 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
70 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 ...
0
votes
0answers
159 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
0answers
238 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
1answer
51 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 ...
1
vote
1answer
122 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. ...
0
votes
0answers
194 views

How can I clip a shapefile in java using geotools?

Does anyone have any advice or sample code that shows how to clip a shapefile using geotools? I am looking to build a simple GUI to allow a user to input a bounding box and polyline shapefile, then ...
1
vote
1answer
387 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
1answer
231 views

Coordinate Conversion in PostGIS

I have some problem with the representation of the coordinates. I need to convert the coordinates from "EPSG: 32633" to "EPSG: 4326", and then create geometries in PostGIS. For the conversion (from ...
0
votes
0answers
83 views

Missing SRS and NoData when writing TIFF rasters in geotools

As I am writing .tif rasters in geotools, the CRS of the written file is not the same of the source (the source raster which I read and processed). My question is : How can I maintain and write .tif ...
3
votes
1answer
632 views

GeoTools WFS Feature retrieval

I am trying to use geotools to retrieve the list of features served by a WFS. I am following the tutorial provided at http://docs.geotools.org/latest/userguide/library/data/wfs.html. The code that I ...
1
vote
1answer
69 views

while reading a tiff file filenotfoundexception

I am unable to create File object while instantiate a tiff file using TestData.file function it is giving file not found exception . But the tif file is exist on the same path file exists ...
2
votes
1answer
156 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 ...
2
votes
0answers
486 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
1answer
227 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 ...
1
vote
0answers
174 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
1answer
131 views

dbf file size is increased after exporting opened Shape file into new Shapefile

I have a shape file(polygon features) which has 7 attributes(id,area,etc.,) in dbf file. After reading the shape file i am exporting to a new Shape file in Which i am adding 2 attibutes (id ,area). ...
3
votes
0answers
91 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 ...
5
votes
1answer
148 views

Good projection for covering most of the world

I'm writing an application for building navigation routes thru the city streets, and not quite sure what projection would be best. I tried EPSG:3587, however, the tools I'm using - GeoTools and ...
2
votes
1answer
777 views

GeoTools and PostGIS with ESPG:3857

I'm trying to use both PostGIS and GeoTools with the same ESPG:3857 projection, however, it looks like the projections in PostGIS and GeoTools differ. This is what I have in PostGIS: PROJCS["WGS 84 ...
3
votes
0answers
78 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. ...
1
vote
0answers
107 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 ...
0
votes
3answers
429 views

How to crop an image based on a shapefile using GeoTools

I'm writing a web application using GeoTools (it's Java running in a web container). I need to crop a raster file based on a shape file. The core GeoTools documentation and examples I can follow ...
0
votes
1answer
214 views

Can I use GeoTools with Gradle?

I am going to implement shapefile uploading from a webform, and ingestion into PostGIS. One problem I am having is that my project is using Gradle for dependency management. I am unfamiliar with ...
1
vote
0answers
145 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 ...
0
votes
0answers
124 views

Create shape file with point

I am trying to create a .shp file with Point shapes. I am following this tutorial: http://docs.geotools.org/latest/userguide/tutorial/feature/csv2shp.html I create the project, no syntax error and ...
1
vote
1answer
58 views

GeoTools Omitting Quotes in its Queries?

I have a table in my PostgreSQL 8.4 with a column 'Shape' of type 'geometry'. When I start up Tomcat my GeoServer throws an exception: 24 Sep 16:20:25 WARN [geotools.jdbc] - Error occured determing ...
1
vote
1answer
134 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 ...
0
votes
1answer
213 views

getDestinationGeographicPoint() in geotools returns wrong coordinates in South/West

I am trying to calculate a coordinate given an azimuth, distance and start point. If my code uses an start coordinate in North/East quadrant, all goes fine. But, by using 0,0 coordinates, an azimuth ...
1
vote
1answer
761 views

combine several polygon objects in one polygon object with geotools (is it possible)?

I have several polygon objects and I need to "merge (or combine or dissolve)" them toghether into one polygon object. With a GIS tool like Quantum GIS, I do this with Geoprocessing option "Combine ...
1
vote
0answers
195 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 ...
4
votes
1answer
562 views

Geotools: Efficiently writing a GeoJSON stream into a Shapefile

I've been trying a few solutions to efficiently convert GeoJSON into a shapefile without having to store all features in memory. I'm using GeoTools 9.2. The problem is not so much in how to stream ...
1
vote
0answers
145 views

Best way for rendering geotools in web service [closed]

I'm using geotools in my web service project. I always thought geotools is somehow compatible with openlayers, but now when it actually came to implementing this functionality, i can't find even one ...