Tagged Questions

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

learn more… | top users | synonyms

3
votes
0answers
251 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 = ...
1
vote
0answers
64 views

Visual edit geographic data with geotools

With JMapFrame I have options for to visualize my geographic datas, but I don´t know how to add tools for to edit this data, equals conventional GIS. It´s possible to do this? att, Augusto
4
votes
0answers
261 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 ...
1
vote
1answer
414 views

The units of getArea() on a multipolygon within a shapefile [closed]

I am using GeoTools to find area and intersections of shapefiles. GeoTools uses the JTS geometry library (Vivid Solutions) and that has functions to getArea() but unfortunately I am not able to ...
2
votes
0answers
128 views

Geotools throws “Cannot encode multilinestring (yet)” while Shape import on Linux

I've encountered a strange platform-dependent SHP import problem. Everything works fine on Windows, shape files are converted fine to database. There is although small little warning: [[ACTIVE] ...
4
votes
0answers
538 views

Could not obtain native oracle connection [closed]

Anyone knows the the cause and how to resolve the "Could not obtain native oracle connection" error? I'm using GeoTools 2.7.4, a oracle 11g DB, ojdbc14.jar, and a simple java code on a Tomcat 6 like ...
2
votes
0answers
250 views

How to programatically add KML Icons to Placemark generated from SimpleFeatures using GeoTools?

I have successfully generated a set of (unstyled) placemarks in a KML file using the GeoTools framework, and the Encoder class. The file renders fine in Google Earth with standard balloon placemarks. ...
1
vote
0answers
435 views

Create a color scale/legend for choropleth map using geotools (or other open source Java library)?

I'm experimenting with choropleth maps using geotools. Is there an easy way to add a color scale to the map (using geotools itself or some other os library)? By a color scale I mean a bar that shows ...
2
votes
3answers
1k views

Rendering a shapefile with a custom projection in GeoTools

I have an image, a shapefile, and a method which can translate an x/y pixel location from the image into a latitude/longitude point or vice versa. I'm trying to use Geotools to render the shapefile on ...
2
votes
2answers
5k views

How to convert UTM (easting,northing) to Geographic (lat,long) in degree decimal using geotools

I want to convert easting, northing values in meters of UTM to lat,long of geographic coordinate system using geotools
1
vote
1answer
222 views

Coordinate Reference Systems errors or bugs?

I have an application that references a JAR file. In that JAR file, I have a method that creates a Coordinate Reference System using the CRS class. This class is Project_Point. When I run and test ...
0
votes
0answers
93 views

How to pass in a database created on the fly in code to Quick_Export in arcpy?

So I am trying to programmatically use quick_export through the arcpy package in an arcmap tool, and so I referenced the quick_export tool's dialog box that comes up when it is executing for the ...
2
votes
1answer
845 views

How can I deploy a custom GeoTools datastore to GeoServer?

I'm using GeoTools v8.0 and GeoServer v2.1.3. I've currently built a working datastore connecting to a PostGIS database based off of the GeotTools' abstract datastore tutorial. After days of on and ...
1
vote
0answers
226 views

How to handle multipoint symbology catalogue (as in mil2525c, tactical graphics appendix b)

Is there a general format (standards based) to store a vector based drawing description for multipoint symbology (means having several anchor points reflecting symbol point <-> geographic point ...
1
vote
0answers
152 views

Get centroid of SimpleFeatures in GeoTools8

I've got some SimpleFeatureCollections and now I want to get the Centroid of every SimpleFeature in the collection. Unfortunally I've only found a centroid method for Geometry. Is there any way to ...
2
votes
1answer
162 views

How to edit and use text produced by Feature InfoTool?

How can I access and use text from Feature InfoTool dialog. I'm working with JMapFrame. I found this snippet: InfoTool tool = new InfoTool() { @Override public void ...
2
votes
1answer
929 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 ...
2
votes
2answers
784 views

How to add a background map to a java project?

I'm new at GIS. I am trying to make a java application that can display a map with certain points. I have achieved this using the geotools library. However, I want to put the map from OpenStreetMap or ...
1
vote
1answer
166 views

Can we read/write MXD Document using GeoTools

Is it possible we can read/write mxd document only using geotools.
3
votes
1answer
169 views

Repaint seems not working when called multiple times from the same method

I have the following scenario: displaySelectedFeatures(IDs); then some code... and then: displaySelectedFeatures(features); Display selected features looks like this: public void ...
0
votes
1answer
95 views

Error running geotools tutorial for CSV2SHP?

Although I run this tutorial I always get following error message: Nov 22, 2011 5:10:50 PM org.geotools.referencing.factory.epsg.ThreadedPostgreSQLEpsgFactory isAvailable WARNING: ...
0
votes
1answer
205 views

GeoTool CSV to Shape Conversion Error

In the Feature Tutorial Example GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory(); generates error: method getGeometryFactory in class ...
1
vote
1answer
1k views

Problem running geotools quickstart application?

package org.geotools.tutorial.quickstart; import java.io.File; import org.geotools.data.FileDataStore; import org.geotools.data.FileDataStoreFinder; import ...
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 ...
3
votes
1answer
198 views

Add NZGD2000 Coordinate Reference System

I'm not sure if this is the right place to ask, but... I've been playing with GeoTools 8.0M-1, in particular trying to read some GeoTiffs. Each time, it crashes with the error No code "EPSG:2193" from ...
3
votes
1answer
538 views

Geomajas: how to write an xml file to config a layer (GeoToolsLayer) fetched from Geoserver?

I need to connect to Geoserver, fetch the layer and display it in Geomajas. I have followed the instruction in this link http://www.geomajas.org/node/280 but it doesn't work for me. The map is just ...
5
votes
2answers
2k views

geotools vs. geotoolkit

The geotoolkit.org web site has very little documentation. From this document I get the impression that it is a fork from geotools; is that right? If so, what were the motives/objectives of the fork?
2
votes
0answers
289 views

GeoTiff specs for coordinate transformation definition

I would like to define a GeoTiff coordinate transformation by a set of GCPs only. The intention is to publish the GeoTiff as a coverage in GeoServer. However if I specify tie points only, GeoServer ...
2
votes
1answer
962 views

GeoTools Dynamic Layer

I need to change the features of a MapLayer in real-time but I don't know how I can update/refresh/repaint the layer on the map without having to remove it and add it again (which creates flickering). ...
7
votes
2answers
1k views

For a given feature find the closest point along a given path

Looking for a Java based (foss4g) solution for the following: I am using a path along with a buffer to find features that are along the path. For each of the features returned I want to find the ...
0
votes
2answers
400 views

GeoTools 2.6.5: Cannot get JMapFrame to work because of problem with processStylers

I am trying to get JMapFrame to work to visualize some feature. Unfortunately I keep getting errors although this test app can be started. Toolbars etc. are shown. 18.02.2011 16:44:38 ...
5
votes
1answer
296 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 ...
5
votes
2answers
4k views

How to parse KML data using geotools?

Geotools contains some packages dealing with KML: org.geotools.kml and org.geotools.kml.bindings. I assume it was designed to parse KML data. Do you know how to use it?
4
votes
3answers
284 views

Differentiating a building from a road on a map?

This question was originally asked here by Steven and I felt the question was better asked here. Steven would also like to know the sources Google buys it maps from. I remember seeing a post about it ...
4
votes
1answer
2k views

Convert Gauss-Kruger to UTM

How to covert Gauss-Kruger coordinates to UTM coordinates with GeoTools java library? As I have figured out the location (zone, country) is important. I need the calculation for Slovenia.
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 ...