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
1 answer

How I can get all the points of a polygon in a shapeFile .shp using GeoTools?

This is my first question in stackoverflow so I hope that I am doing it in the right way. I am using geotools to read a shapeFile (.shp) and I cannot find the function to get all the points of the polygon. By now I have the following code: public…
Alex Blasco
  • 793
  • 11
  • 22
2
votes
2 answers

What is the fastest way to slice an image into tiles?

I need to slice an image (size: 14043 × 9933) into 256 x 256 set of tiles with different zoom levels (number of tiles) in the most efficient way. I've been using gdal2tiles.py(it comes with GDAL), but I wonder if there's other options out there,…
ddayan
  • 4,052
  • 6
  • 27
  • 32
2
votes
1 answer

Custom MongoDB codec for JTS (GeoTools)?

I'm experimenting with a Java client to store spatial data in MongoDB, however I'm hitting the exception: org.bson.codecs.configuration.CodecConfigurationException: Can't find a codec for class com.vividsolutions.jts.geom.Point. I guess my Java…
Mike Stoddart
  • 488
  • 7
  • 21
2
votes
1 answer

Geomesa bounding box query Accuracy

Geomesa is a spatial temporal database, more details are available here: http://www.geomesa.org/ I am trying the example tutorial, by setting up Hbase database with it. I am running the Hbase QuickStart tutorial…
2
votes
1 answer

GeoTools, Java: How to convert shapefile data from DOR to usable polygons with Latitude and Longitude coordinates

The shapefiles I'm concerned with can be found here, though I'm sure this could apply to any shapefile using coordinates based on state plane coordinates: http://dor.wa.gov/content/FindTaxesAndRates/stshpdownloads.aspx I'm currently using GeoTools,…
Eric
  • 23
  • 2
2
votes
1 answer

Where is org.geotools.data.postgis?

I'm trying to import WKBReader by including import org.geotools.data.postgis.WKBReader;. The WKBReader class should be in org.geotools.data.postgis according to the documentation, but package is not available for me. I tried to add the gt-postgis…
wambacher
  • 175
  • 7
2
votes
0 answers

Geotools JAI fatjar causing problems in native dependencies

I have a scala project using geotools / JAI dependencies in order to process ESRi ASCII Grid files to WKT in java. When deploying a fat-jar, I get a SIGSEV in the native part of the jai code. It is using the following dependencies: lazy val geotools…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
2
votes
1 answer

SBT can't resolve OSgeo /JAI maven dependencies

I want to read ESRI ASCII geo grid files into java. Therefore geotools and t-arcgrid are required. When loading these into set like libraryDependencies ++= Seq( "org.geotools" % "gt-main" % geotools, "org.geotools" % "gt-arcgrid" % geotools ) I…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
2
votes
1 answer

GeoTools WFS without DescribeFeatureType calls

I'm trying to access a WFS source by using the GeoTools WFS plugin as presented here. However, the layer I'm trying to fetch is only accessible through a proxy, and the GetCapabilities page has the plain URLs (ie. not the proxy URLs). Thus, my…
user6103910
2
votes
1 answer

How to save a pixel array with more than 4 bands to a Tiff/GeoTiff file in java?

Suppose I manually created pixel values for more than 4 bands and I want to store them in a tiff file. Those bands can be for R, G, B, temperature (values of temperature are not in the range of 0 to 255 thus I am using int instead of byte for…
2
votes
2 answers

GeoTiffReader prevents deleteOnExit

If I pass GeoTiffReader a File instance which has been marked as deleteOnExit() that file will not be deleted on exit. File geotiffFile = Paths.get("geotools-test.tiff").toFile(); geotiffFile.deleteOnExit(); GeoTiffReader reader = new…
spt5007
  • 178
  • 1
  • 7
2
votes
1 answer

Where can I find EPSG codes for UTM (e.g., 16001)

Is there a plugin or database that I would use to add the EPSG codes for UTM zones to geotools?
Tim Dalsing
  • 159
  • 2
  • 7
2
votes
1 answer

Using Geotools from Clojure - Unhandled java.lang.NoSuchFieldError METER

Okay, so the guts of the issue is I'm getting this error: Unhandled java.lang.NoSuchFieldError METER Stacktrace: Parser.java: 560 org.geotools.referencing.wkt.Parser/parseSpheroid Parser.java: 656 …
Alex Lynham
  • 1,318
  • 2
  • 11
  • 29
2
votes
0 answers

GeoTools, Quickstart : java.lang.NoClassDefFoundError: javax/media/jai/PropertySourceImpl

I'm trying to launch the Quickstart from Geotools Here is the code: package org.geotools.tutorial.quickstart; import java.io.File; import org.geotools.data.FileDataStore; import org.geotools.data.FileDataStoreFinder; import…
william
  • 33
  • 5
2
votes
0 answers

Caused by: org.opengis.referencing.NoSuchAuthorityCodeException: No code "EPSG:4326" from authority "EPSG" found for object of type "EngineeringCRS"

I am trying to use GeoTiff and JAI in one of my one program, but I am having following error. Caused by: org.opengis.referencing.NoSuchAuthorityCodeException: No code "EPSG:4326" from authority "EPSG" found for object of type "EngineeringCRS". The…
prem30488
  • 2,828
  • 2
  • 25
  • 57