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

learn more… | top users | synonyms

20
votes
4answers
5k views

How to bypass 10 character limit of field name in ShapeFiles?

I'm exporting geometry with attached text attributes from oracle database to esri shapefile format (.shp) with Java and Geotools library. Attribute columns in our database have names with more than ...
1
vote
1answer
324 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, ...
7
votes
3answers
3k views

How to write GML with Geotools?

I'd like to write GML using Geotools. Unfortunately, I can't find documentation on a GML Writer (except for this one from 2006: http://docs.codehaus.org/display/GEOTOOLS/WFS+++GML+DataStore). Could ...
4
votes
1answer
971 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 ...
2
votes
1answer
324 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 ?
5
votes
1answer
295 views

How to add Opencarto to a Geotools project?

I've installed geotools through maven (and m2ecplise) but i'm not able to add opencarto library to my project. (As you can guess, I'm new to java) I tried by adding opencarto's main folder as library ...
2
votes
0answers
29 views

Ortholines in GeoTools

I am using GeoTools 10.7 to generate a map with decorations in my Java application. One of the feature I need in the map is to display ortholines both latitude and longitude. The lines will need to be ...
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 ...
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
2
votes
1answer
918 views

What is the most efficient way to create a shapefile from resultset using geotools

I am facing a problem to write to shapefile (geotools) with respect to time, memory etc. My workflow is something like reading spacial data from database Oracle with attributes and coordinates (can ...
4
votes
0answers
260 views

Can GeoTools parse GML CRS definitions?

A kind of branching of this question. Soon I will need to handle GML Coordinate Reference Sysyem definitions in a Java servlet. Links: GML OGC reference. Concrete example. I know that GeoTools ...
3
votes
1answer
146 views

Coordinate conversion (EPSG:3857 to EPSG:4326) using OpenGIS/JTS too slow

I am using the Java based libraries of OpenGIS and JTS to convert coordinates from EPSG:3857 to EPSG:4326 to proceed to compute the distance using the Haversine formula. The distance features in a ...
3
votes
0answers
460 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 ...
2
votes
1answer
692 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 ...
1
vote
1answer
63 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 ...
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. ...
1
vote
1answer
616 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 ...
0
votes
0answers
17 views

Create a point on a map using geotools

public class GeotoolsFxTest extends Application { Group root = new Group(); Group map1 = new Group(); Group map = new Group(); Group texts = new Group(); Scene scene; private double dragBaseX, ...