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

Maven failed to download geotools dependencies

I want to use geotools in my java project, doing something like: import org.geotools.data.shapefile.ShapefileDataStore; Tried to add some geotools' required dependecies in my pom.xml file, like this:
YQ.Wang
  • 1,090
  • 1
  • 17
  • 43
1
vote
1 answer

GeoTools getCapabilities with no CRS in boundingbox

I'm tring to retrieve a cababilities from a MapServer: URL url = null; try { url = new URL( sourceUrl ); } catch (MalformedURLException e) { //will not happen } WebMapServer wms = null; try { wms = new…
Magno C
  • 1,922
  • 4
  • 28
  • 53
1
vote
1 answer

Geotools ViewType on GridCoverage2D

I am currently updating our projects Geotools jars from 10.8 to RC 21. I've run into an issue where in the coverage jar(gt-coverage-21-RC.jar) the ViewType class no longer exists. Also the code that uses that class on the GridCoverage2D class…
fergp25
  • 41
  • 4
1
vote
1 answer

GeoJSON : Check if a Geo Coordinate is inside Polygon

I have following GeoJSON data file which contains a polygon with coordinates. [ { "geometry": { "type": "Polygon", "coordinates": [ [ [ 9.137248, 48.790411 ], …
Arun Kumar
  • 6,534
  • 13
  • 40
  • 67
1
vote
1 answer

Creating Google Map Overlay with Geotools

Good morning, I want to create a Google Maps overlay from GeoTiff data I read with Geotools. I'm new to Geotools and I wasn't able to find any documentation about creating map tiles with this framework. Do you guys know of any such possibility or…
Patrick
  • 809
  • 3
  • 9
  • 21
1
vote
1 answer

Are there some APIs in GeoTools for the conversion from raster data to vector data?

I am new to GeoTools and need to convert raster data to vector data. I want to convert my raster data to features such as point, line, and polygon. I think I've found some for conversions such as 'PolygonExtractionProcess' and…
Victoria
  • 67
  • 5
1
vote
2 answers

Exporting HSQLDB database with UTF-8 encoding

I'm trying to export the GeoTools HSQL 2 database and load it back into HSQL 1 for a legacy system that needs the older database format. The tables include characters like the degree symbol. However, it's coming out as the escape sequence \u0080…
Kurt Schwehr
  • 2,638
  • 3
  • 24
  • 41
1
vote
1 answer

Emty polygon result from point geometry while using JTS BufferOP with parameter capstyle flat

I am using geotools and the jts class BufferOP to create a buffer around my geometries. During tesdting I came along a weard result with point geometries. If i set capstyle to flat, my result is always an emty polygon. Lines and Polygons are…
F.M.
  • 193
  • 2
  • 8
1
vote
1 answer

Encoder in GeoTools does not work for SLD

I'm trying to use GeoTools to write SLDs on the fly for an application I am developing. But try as I might, I can't get the SLDs to be output. Starting with an SLD that looks like this:
Michael
  • 47
  • 5
1
vote
1 answer

Ingest GeoTIFF using geomesa-accumulo

I am trying to ingest geotiff data using geomesa-accumulo but getting the following error: WARNING: Failed to load the GDAL native libs. This is not a problem unless you need to use the GDAL plugins: they won't be enabled. …
Lal
  • 14,726
  • 4
  • 45
  • 70
1
vote
1 answer

Deactivate Geotools INFO logs in JAR

I am using Geotools (version 19.2) to fetch some features. To deactivate the Geotools logging (< SEVERE) I tried 2 things: As I understood the logging documentation (documentation…
Lars
  • 2,315
  • 2
  • 24
  • 29
1
vote
1 answer

Error parsing conf core-default.xml While running shadow jar of geotool with Spark

I have created a spark application that process lat/long and identifies the zone defined in custom shape files provided by client. Given this requirement, i have created a shadow jar file using maven. But when i run application via spark-submit it…
1
vote
1 answer

Rename Shape File which saves as TableName using Geotools - JAVA

I am trying to save a shapefile which works fine as followed by this question link here: Add new column attribute to the shapefile and save it to database using Geotools Java The problem I face is with the fileName of the shapefile, which contains…
GeoFresher
  • 301
  • 2
  • 12
1
vote
1 answer

Transform FeatureCollection to a LineString with Geotools

I am using Geomesa and I want to program something that works with JAVA , here in this exampel I am trying to fetch some points in a zone and transform it to a line to draw it later : Query query=new Query(feature.getTypeName()); …
DJAMEL DAHMANE
  • 404
  • 4
  • 15
1
vote
1 answer

Java: WFSDatastore return the Features to be used in the main class

i am pretty new in Java Programming so i am thankfull for any help. I am currently trying to get the Features of a WFS Datastore to be accessed in the another class of the project - for further retransforming the projection and displaying these…
Chris S.
  • 21
  • 2