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

learn more… | top users | synonyms

0
votes
0answers
227 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
994 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
47 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
188 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
59 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
97 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
147 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
120 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 ...
1
vote
1answer
42 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
79 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
132 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 ...
1
vote
0answers
98 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
26 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
95 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
66 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
187 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
28 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 ...
2
votes
2answers
310 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
69 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
70 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
42 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?
3
votes
1answer
529 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
65 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
209 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
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
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
195 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
189 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 ...
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 ...
5
votes
1answer
450 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
112 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. ...
2
votes
0answers
203 views

How to use CropCoverage Render Transformation in Geoserver SLD (WPS)? [closed]

I have yet to find an example on the web (or in code) of anyone using the "Crop Coverage" Render Transformation from a Geoserver SLD. Does anyone have an example or at least be able to point me to ...
3
votes
1answer
210 views

How to write GML parser with Geotools?

I wrote a Parser for a GML file from the OS Mastermap with geotools 8.4. With one part I still have a problem. This sniplet of the xsd: <complexType name="RoadLinkType"> ...
0
votes
0answers
182 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 ...
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
33 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
1answer
160 views

ImageMosaic-JDBC Error

I'm trying to get postgis raster layers in geoserver-2.3.1, with postgresql-8.4, postgis-2.0 and gt-imagemosaic-jdbc-9.1.jar support. I'm going through the tutorial with a PNG raster that i have. In ...
0
votes
0answers
116 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
207 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
3answers
405 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
0answers
76 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 ...
2
votes
1answer
197 views

How to modify the coordinates of a SHP geometry using Geotools?

I have a shapefile with some polygons. I would like to change the height for this elements using Java. The rest of the attributes should be the same. I've thought using GeoTools but I haven't found ...
1
vote
1answer
67 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
0answers
455 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 ...
1
vote
1answer
371 views

GetCapabilities Request for WMS

I'm trying to connect to a WebMapServer with the Geotools WMS classes. My problem is, that the resonse-object "capabilities" doesn't contain all layers. When I'm doing the request in a browser, I can ...
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
1answer
122 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
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
2answers
756 views

Merging Shapefiles With Geotools

I am trying to merge some shapefiles with different schemas in geotools. Im aware of ogr2ogr, but for now I would like to figure out this problem with Geotools. The steps I'm taking are: 1) Create a ...
2
votes
1answer
747 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 ...