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

learn more… | top users | synonyms

1
vote
1answer
60 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
100 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
64 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
39 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
192 views

Geotools writing shapefiles without geometries

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
229 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 ...
1
vote
0answers
95 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
107 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
79 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 ...
10
votes
3answers
779 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 ...
0
votes
1answer
138 views

How to specify field name in raster to feature conversion tool or intersect tool?

What I want to do : input: raster file, polygon feature layer process: Convert raster to polygon using IConversionOp.RasterDataToPolygonFeatureData Method Intersect resultant polygon feature class ...
1
vote
1answer
291 views

Simple WebMapping application with postgis Database

am very new to web-mapping, so this question may be a little misguided. I want to develop a simple web mapping application using OpenLayers which can display Cadastral information that are currently ...
2
votes
1answer
117 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
177 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 ...
0
votes
1answer
105 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
214 views

Getting: org.opengis.referencing.NoSuchIdentifierException: No transform for classification “Transverse Mercator Zoned Grid System” with geotools

Using geotools I've been trying to create a referenced envelope after converting/reprojecting from WGS 84 to UTM with specific zones and it seems that either I need to do something with authority ...
2
votes
2answers
467 views

GeoJSON to Shape file conversion with geotools

Can someone please provide me an example of how to convert GeoJSON to Shape file using geotools?
1
vote
1answer
100 views

Diff operation in PostGIS/Geotools

What is the best way to perform a diff operation on Postgis features/tables or Geotools objects? Are there any automatic methods I can use? If not, what would be the optimal way to implement your own ...
1
vote
2answers
698 views

Getting MongoDB working with GeoServer 2

I'm trying to use MongoDB with GeoServer but it is actually not working at all. Someone once posted this: Getting MongoDB Working with GeoServer, but since he could solve his problem without any help ...
3
votes
0answers
352 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 ...
4
votes
1answer
107 views

Global projection with zero scale distortion at non-zero latitude

I am looking for a global projection with zero scale distortion at non-zero latitude. I have tried using an Oblique Mercator projection centred at a specific latitude and longitude of centre (with ...
2
votes
0answers
203 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 ...
3
votes
0answers
146 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 ...
5
votes
2answers
791 views

Fastest way to convert shapefile to postgis in java

I have been using geotools to read shapefiles and import them into postgis. Unfortunately, when large files are being imported, this leads to a massive lag time --8000% of shp2pgsql piped into pgsql-- ...
4
votes
1answer
383 views

What do I need to create 3D model of real terrain?

I'd like to create 3D model of some real terrain (to be exact it's about some real roads and only as much as 80m to 100m of roadside - 40m to 50m of each side). As I don't have access to highly ...
3
votes
1answer
154 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"> ...
1
vote
0answers
384 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 ...
1
vote
0answers
150 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 ...
1
vote
0answers
133 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 ...
2
votes
1answer
106 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 ...
3
votes
1answer
245 views

How to couple GeoTools GML bindings for encoding to GML 3.1.1

I've successfully created GeoTools (8.3) bindings for parsing and encoding XML bindings as described in their tutorial: http://docs.geotools.org/latest/userguide/library/xml/internal/bindings.html I ...
4
votes
1answer
3k views

How to draw polygons on an existing map?

If you want a map with some circles, squares, etc. representing cities or something else you can use the following code. Note that you can change the map and the coordinates with yours, and you'll ...
2
votes
0answers
279 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 ...
3
votes
2answers
628 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
0answers
30 views

How to convert a shapefile to WKT with GeoTools snapshot 9? [duplicate]

Possible Duplicate: Write out a WKT file from a loaded shapefile I need to convert a shapefile to WKT to be read in OpenLayers. The shapefile is one that has been created by Geotools. ...
0
votes
1answer
495 views

Display google maps with Geotools?

I would like to display Google maps (Raster and Vector) in Java using GeoTools. I am stuck because I am new to this library. Are there any tutorials out there that can help me ?
2
votes
1answer
255 views

What is the best API to use GeoTools or uDig (for the context of my application)?

I am trying to develop a java application that displays : Google maps, Openstreetmap and Bing Map Data. So which is the best SDK to use in this contet Geotools or uDig ?
2
votes
3answers
3k views

Displaying Google Maps and OpenStreetMap map in Java?

Is there any Java API that is like OpenLayers ? I would like to display google Maps and Openlayers Maps in a java application
3
votes
0answers
123 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
1answer
603 views

How to overlay a Shapefile on a WMS layer using Geotools?

I am trying to overlay a shp file on wms layer using the example http://docs.geotools.org/latest/userguide/tutorial/raster/image.html. Each time I want to read the format of the file to get a reader ...
3
votes
0answers
318 views

How to sort a SimpleFeatureCollection using GeoTools?

I have a featurecollection: SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(dbFeatureType); SimpleFeatureCollection collection = FeatureCollections.newCollection(); while ...
2
votes
0answers
272 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 ...
6
votes
1answer
715 views

Find Perpendicular Distance and Minimum Perpendicular Vector between a Point and a Line using GeoTools and JTS

I have a line formed by 2 lat/lon pairs, and the lat/lon of a point. I would like to find out the perpendicular distance between the line and the point on the Earth surface (can assume Earth as great ...
2
votes
0answers
216 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(); ...
3
votes
0answers
180 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 ...
2
votes
1answer
393 views

Geotools // buffer using different CRS

I'm currently having a problem with Geotools. I try to generate a buffer (in meter using Lambert 72) on a map that has WGS84 as it's coordinatesystem. (problem is a bit like this one: ...
1
vote
0answers
227 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 ...
0
votes
0answers
58 views

How to load an image to mark the city (instead of point) using GeoTools?

I went through the Image Tutorial in http://docs.geotools.org/stable/tutorials/raster/image.html and was able to load image and get the output. But I need to load the image without use of world file ...
3
votes
1answer
204 views

Problem in displaying a GeoTiff image in JMapFrame

I'm trying to display a GeoTiff image with no projection but where the geographical extent (bounding box) is known: reader= format.getReader(new File(sImageName)); GridCoverage2D gridCoverage= ...
2
votes
1answer
198 views

ImageLab Program Problem

I am new to GeoTools. I was trying the samples in http://docs.geotools.org/latest/userguide/tutorial/raster/image.html. I am not able to run the ImageLab sample code. I know it would be some lack in ...