Questions tagged [geotools]

GeoTools is an open source Java library that provides tools for geospatial data (http://geotools.org). Questions about programming using GeoTools are on topic here, while questions on geographic issues (while using GeoTools) should be asked on https://gis.stackexchange.com.

For questions about how to complete geographic tasks using the GeoTools library you may want to ask on https://gis.stackexchange.com/ to get answers, if your question focuses on programming issues with GeoTools then ask on this site.

565 questions
2
votes
2 answers

Neo4j Spatial over REST through the JAVA API not working (for me)

I'm working on a Grails app over Neo4J which I'd like to also export as a GIS database. Looking at the examples for how to use neo4j in GeoServer/uDig it appears that the Spatial integration is only via embedded neo4j databases. Does anyone know…
Dr Joe
  • 718
  • 5
  • 19
2
votes
1 answer

How to get intersected lines by endPoint or startPoint using filter Geotools

I have a LineString featureSource. For one feature from source I want to take intersected lines by startPoint or endPoint from same featureSource. I tried this for just endPoint: Filter filter = ff.intersects(ff.literal(featureLastCoordinate),…
cgrgcn
  • 361
  • 2
  • 6
  • 24
2
votes
3 answers

Generic type invocation using string class names

Hope you can help me with this: I have ... a string list of class names called classNameList a generic class Geography a static generic method void read(Class cl, Geography geo) I want to loop through the string class name list and…
Johannes
  • 23
  • 4
2
votes
2 answers

What distance calculation (longitude, latitude) is more precise?

I am comparing two different ways of calculating a distance between two Points. Haversine formula found on the page: http://www.movable-type.co.uk/scripts/latlong.html The following functionality of the geotools library: GeodeticCalculator…
Subby
  • 1,997
  • 4
  • 22
  • 38
2
votes
1 answer

Converting ED_1950_UTM_Zone_32N (23032) to WGS84

I need to import and treat a Shapefile using the above mentioned coordinate system into a Java application that uses WGS84 coordinate system. More specifically, I read the shapefile and extract polygons, and store each polygon to an object in my…
usr-local-ΕΨΗΕΛΩΝ
  • 26,101
  • 30
  • 154
  • 305
2
votes
0 answers

How to apply a custum label on polygons in Geotools?

I am new to Geotools and I am stuck in trying to get custom labels on polygons in Geotools. What I get running is a map with the wanted regions filled with the liked colors. Yet, it is needed to have different labelling than the standard postal…
Jochen
  • 121
  • 1
  • 1
  • 5
2
votes
0 answers

GeoTools: Saving grid to shp file

I am very new to GeoTools. I would like to create a hex grid and save it to a SHP file. But something goes wrong along the way (the saved SHP file is empty). In the debug mode I found that the gird is correctly created and contains a bunch of…
dotwin
  • 1,302
  • 2
  • 11
  • 31
2
votes
2 answers

GeoTools: Drawing polygons on map

I'm new to the GeoTools library for Java and I'm simply trying to draw a polygon on a map. I'm using GPS coordinates for points, which draw just fine, but I just can't figure out how to draw the LineString between them to save my life. I have…
user3032769
  • 21
  • 1
  • 4
2
votes
2 answers

Why does this GeoTool snippet not produce a viewable shapefile?

i'm creating a simple program which reads values from a csv file and creates a shp file based on these values. This is a sligh modification of this example The shape file seems to created, but when i view the shapefile with a another snippet I don't…
jorrebor
  • 2,166
  • 12
  • 48
  • 74
2
votes
1 answer

Avoid warning from Geotools StreamingRenderer: Rendering Buffer

In our application we get a warning from the method org.geotools.renderer.lite.StreamingRenderer.findRenderingBuffer(..) WARNUNG: Assuming rendering buffer = 0, but estimation is not accurate, you may want to set a buffer manually. The…
Claude
  • 1,724
  • 3
  • 17
  • 46
2
votes
2 answers

Read Shapefile extent with Geotools

Is there any possibility to get the extent of a Shapefile using the GeoTools library? I want to read the TOP, LEFT, BOTTOM, RIGHT coordinates from the SHP. Seems like there is no kind of getExtent() method...
manuSO
  • 53
  • 1
  • 6
2
votes
0 answers

GeoTools Routable Shapefiles

Hello dear Geo Tools developers. I have discover Geo Tools few weeks ago and find it very interesting. However as I am completely new there I have a question. I try to use roads.shp file to calculate a route between two points founded here:…
Yuriy Chernyshov
  • 506
  • 6
  • 12
2
votes
1 answer

geotools reader

I have a problem when I try to get object from AbstractGridCoverage2DReader. I need it to get CoordinateReferenceSystem and coverage. File file = new File("Resource/new.tif"); AbstractGridFormat format =…
porterjr
  • 92
  • 7
2
votes
0 answers

Geotools NAVCONTransform constructor

I'm having trouble getting NADCONTransform to work with GeoTools-9-SNAPSHOT. My example looks like this: String latGridFile = "C:/NADCON/Grids/conus.las";
String longGridFile = "C:/NADCON/Grids/conus.los"; NADCONTransform transform =…
2
votes
1 answer

Build problems with Maven and GeoTools (com.sun.javadoc)

I'm trying to build GeoTools 8.0-RC2 (itself, not a tutorial project or the like) with Maven 3.0.4. When I run mvn install on the root pom it seems to work fine until a build error concerning com.sun.javadoc and com.sun.tools.doclets occurs. The…
alexfr
  • 1,161
  • 3
  • 12
  • 23