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

learn more… | top users | synonyms

0
votes
2answers
170 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
169 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
55 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
151 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
201 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
48 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
107 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
166 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
328 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
0answers
53 views

How can i get the contour (boundry line) of a feature collection

I have all parcels of given locality as a FeatureCollection. Each parcel is a Feature with a MultiPolygon outlinine the boundry of that parcel. I would like to get a Multipolygon that has the shape ...
0
votes
0answers
31 views

GeoTools ImageMosaic info

I wish I could merge several images georeferenced using a java application. in this link I saw that I can achieve my goal using the library "imagemosaic" of GeoTools. I can not find any guide or ...
0
votes
0answers
110 views

Eclipse Quickstart installation Problem

i try my best to install GeoTools using Eclipse QuickStart GeoTools 10 snapshot,and follow all the instructions,but i could't succeeded, and its give error message of download jar....i spend a lot ...
0
votes
1answer
191 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
68 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
546 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
64 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
139 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
407 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
178 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
164 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
114 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
87 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
146 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
698 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
70 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
103 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
376 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
160 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
140 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
118 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
55 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
108 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
161 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
623 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
180 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
499 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
127 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 ...
3
votes
1answer
84 views

Abstract Data Store

I'm trying to create a new extension for data store in geoserver that can take data from in-memory arrays.But as I'm kind of new to geotools I'm not sure how to do it.Any help would be really ...
2
votes
0answers
313 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
1answer
974 views

getting error while reading shape file (The following locker still has a lock)?

I am working with reading and writing shapefiles. I can read and write a shapefile but while reading it the warning message below is coming in the console, no error is coming. reading 29 Aug, ...
1
vote
1answer
76 views

Writing shapefile metadata with geotools

Using GeoTools, I'm able to write features to a shapefile by essentially passing a SimpleFeatureCollection to a ShapefileDataStore. The feature collection provides both a schema and features including ...
0
votes
0answers
148 views

How to have polygon labels always display using GeoTools 8?

I'm not able to consistently display labels for polygon features. The label is not displayed, as far as I can tell, unless the polygon is large enough to contain the entire label string. I can ...
1
vote
1answer
116 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
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 ...
0
votes
2answers
288 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 ...
0
votes
1answer
294 views

geotools / jts crs transformation result not at correct position

I copied the example from geotools, which shows how to transform a shapefile into a different projection. (http://docs.geotools.org/latest/userguide/tutorial/geometry/geometrycrs.html) But when ...
2
votes
0answers
126 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). ...
0
votes
1answer
155 views

geotools oracle spatial plugin samples / documentation

I plan to use geotools and I saw that there is an oracle plugin available, but the documentation is not very detailed. Are there any examples or documentations available to access the functionality of ...
2
votes
1answer
100 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 ...
11
votes
3answers
848 views

How to build a portfolio for a GIS/Java career path?

I have been a GIS Analyst for over 10 years and am currently studying java (50% through the course). My plan is to develop GIS applications mainly focused towards open source solutions. I would like ...