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
61
votes
5 answers

Does anyone know of a library in Java that can parse ESRI Shapefiles?

I'm interested in writing a visualization program for the road data in the 2009 Tiger/Line Shapefiles. I'd like to draw the line data to display all the roads for my county. The ESRI Shapefile or simply a shapefile is a popular geospatial …
KingNestor
  • 65,976
  • 51
  • 121
  • 152
29
votes
5 answers

Java, convert lat/lon to UTM

Does anyone know of a way, in Java, to convert an earth surface position from lat, lon to UTM (say in WGS84)? I'm currently looking at Geotools but unfortunately the solution is not obvious.
Steve Kuo
  • 61,876
  • 75
  • 195
  • 257
27
votes
4 answers

I get an error downloading javax.media.jai_core:1.1.3 from maven central

I get an error downloading javax.media.jai_core:1.1.3 from maven central. The error is: download failed: javax.media#jai_core;1.1.3!jai_core.jar using play compiler.
gavioto
  • 1,695
  • 2
  • 17
  • 38
27
votes
5 answers
19
votes
4 answers

how to convert between degrees, minutes, seconds to Decimal coordinates

Looking for a java utility. It is even better if you can tell me how to do it using geotools library.
Aravind Yarram
  • 78,777
  • 46
  • 231
  • 327
18
votes
6 answers

Geotools cannot find HSQL EPSG DB, throws error: NoSuchAuthorityCodeException

I am running Geotools inside of Apache Storm, and having a heck of a time with geotools dependency management. Every thing works when I run the storm cluster locally (windows 7 laptop), but when I deploy to the cluster I get this exception in my…
Mark Giaconia
  • 3,844
  • 5
  • 20
  • 42
15
votes
1 answer

How to calculate the distance in meters between a geographic point and a given polygon?

First of all, I'm new to GIS, so pardon any mistakes. I need to discover the distance between a latitude and longitude point and a latitude/longitude polygon (regular or not). Precisely, I need to discover the minimal distance from a given point to…
Marcos Roriz Junior
  • 4,076
  • 11
  • 51
  • 76
13
votes
1 answer

geotools SEVERE: The following locker still has a lock read on file

I am using geotools to extract data from shapefiles and store them into mysql. My application works all the time but I get this lock every so often which i cannot understand why, as it still works [root@website-qc filespool]# /usr/bin/java -jar…
shorif2000
  • 2,582
  • 12
  • 65
  • 137
10
votes
3 answers

java.lang.NoClassDefFoundError: Could not initialize class javax.media.jai.JAI

I recently started my first program with GeoTools in which i was also using JAI- Java Advanced Imaging 1_1_2_01 with JDK 1_7. It worked fine until I added GeoTiff Jars. I found following error Exception in thread "main"…
prem30488
  • 2,828
  • 2
  • 25
  • 57
10
votes
3 answers

Reading an ESRI shapefile from a zip-file during Runtime in Java - DataStoreFinder.getDataStore(connectParameters) returns null

We are building a service for uploading zip-files containing an ESRI-shapefile. The service should be able to read the shapefile and do stuff with its content. So I've built a class that unzips the zip-file to temporary folder (subfolder of…
Martijn
  • 274
  • 1
  • 4
  • 17
9
votes
10 answers

Java equivalent of OpenLayers

I am looking for a Java library to display map data from various sources, including shapefile, WMS, WFS, Google Maps, possibly ArcIMS, etc. It seems like OpenLayers is the closest thing to what I want, except it's a JavaScript library, and I'm…
dave4351
  • 2,208
  • 2
  • 18
  • 17
8
votes
2 answers

Using GeoTools: What is the Latitude and Longitude in com.vividsolutions.jts.geom.Coordinate class?

I will use com.vividsolutions.jts.geom.Coordinate as my coordinate class. But don't find any document which is the correct order of the coordinate. is it standard? Here's the java doc link ->…
eros
  • 4,946
  • 18
  • 53
  • 78
8
votes
3 answers

How do I configure Xcode to use Maven

XCode comes out of the box with support for Ant (with several sample projects you can generate). How can I configure XCode to use maven pom.xml files? Fore reference the project I am trying to set up is…
Jody Garnett
  • 503
  • 3
  • 10
8
votes
2 answers

How to handle Circle in WKT?

I am having a json object as area : CIRCLE (28.625360369528934 77.2227479486792, 3135.6) how to parse it using WKTreader?
codepeaker
  • 420
  • 8
  • 15
8
votes
3 answers

How do I create a circle with latitude, longitude and radius with GeoTools?

Right now I have: Polygon circle = geometryBuilder.circle( myLong, myLat, radiusInMeters, 10); And it creates (with lat=28.456306, long=-16.292034 and radius=500) a nonsense polygon with huge latitudes and longitudes, such as: POLYGON ((483.678055…
jonayreyes
  • 538
  • 1
  • 10
  • 27
1
2 3
37 38