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

learn more… | top users | synonyms

0
votes
1answer
189 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
467 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
186 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
341 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
156 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
264 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
710 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
107 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 ...
2
votes
1answer
1k 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
466 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
130 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
262 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
186 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
1k 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
451 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
202 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"> ...
2
votes
0answers
494 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 ...
2
votes
0answers
196 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
178 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
133 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
302 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
4k 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
352 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
738 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
31 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. ...
1
vote
1answer
580 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
327 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
4k 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
158 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
850 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
439 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
309 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
1k 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
328 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
232 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
503 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
264 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
69 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
251 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
271 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 ...
2
votes
0answers
112 views

GeoTools, add column in query with CQL

I'm trying to query the database (DataStore) and want to let the datastore calculate a value for me. In SQL I would do it like this: SELECT name, ST_Area(ST_Intersection(the_geom, ....) AS myValue ...
2
votes
0answers
84 views

MultiPolygon from database

I would like to know how to create an instance of a Multipoint from a PostGIS database.. I do the query , then got the ResultSet named "area" , the column with MultiPolygon attributes is named "geom" ...
1
vote
2answers
409 views

GeoTools Oblique Mercator Example

I would like to use the Oblique Mercator projection in GeoTools. I'm currently using a WGS84 Mercator projection like this: final CoordinateReferenceSystem wgs84CoordSystem = CRS ...
1
vote
1answer
615 views

web gis application with geotools?

I need to create a new gis application with OpenLayers and PostGIS. I think that Geotools is a good choice for the Layer between these two. I thought about embedding geotools in a web application ...
2
votes
1answer
146 views

Can I use a Geotools raster layer in a Geomajas webapplication?

I am working on a Geomajas web application and have a Geotools RasterLayer (a GridReaderLayer to be precise) that needs to be integrated with the map in the Geomajas app. I have been searching the ...
5
votes
1answer
430 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
2answers
172 views

How to have a nullable field included in a shapefile using the Geotools library?

I am trying to add a new field to a shapefile and need it to store null values. But by using SimpleFeatureTypeBuilder from the Geotools library and then using the Add command, it is not giving the ...
2
votes
2answers
6k views

convert wgs84 coordinate to Google Map coordinate system(EPSG 3785) with geotools and java

Could you please point me out where can I make such a transformation: convert wgs84(EPSG 4326) coordinate to Google Map coordinate system(EPSG 3785), and vise versa. Thank you.
4
votes
1answer
975 views

Write out a WKT file from a loaded shapefile

We are looking to load and display a shapefile, simple polygons, then write out a WKT string of that shapefile and have the user save it somewhere. Does anyone have some code snippets of that very ...
3
votes
0answers
250 views

How to get distinct values from multiple columns in GeoTools?

Is there a way to get distinct values from multiple columns in geotools? I know I can get unique values from a column like this: SimpleFeatureSource featureSource = ...