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

GeoTools to read featureSource from a different postgresql schema than public

Working my way through GeoTools. Just trying to read features from a view in postgresql that is not in public schema. I have a bunch of views in a schema called cache store = DataStoreFinder.getDataStore(map); // print a bunch of tables and views…
Eric Boisvert
  • 135
  • 3
  • 9
1
vote
1 answer

Why can't I delete the tif file after releasing the resources?

I want to read bbox of this tiff, after completion I want to delete this tiff, There seems to be an unclosed stream causing the tiff to not be deleted. public static void main(String[] args) throws Exception { File file = new…
Arjen10
  • 38
  • 6
1
vote
1 answer

how to draw symmetrical line to the polygon?

I have a road polygon that I need to divide in given lanes. So I get a JTS geometry of roads from shapefile and I need to create lines or basically create a geometry lines (lanes) within that polygon. Something like this The more complex scenarios…
user1298426
  • 3,467
  • 15
  • 50
  • 96
1
vote
1 answer

Get country level Geometries from GADM

I'm using geotools to open gadm36.shp from gadm.org which shapefile containing worldwide administrative areas. I'm trying to get a single Geometry (e.g. org.locationtech.jts.geom.MultiPolygon) for each country. So if for example, there were 195…
J'e
  • 3,014
  • 4
  • 31
  • 55
1
vote
1 answer

Java GeoTools Feature Information Window not correctly loading Feature information

So I have tried a few different ways to create SimpleFeatures for a single data point, from various different samples of code, with no success. I can successfully create a FeatureCollection that contains the information such that the point is drawn…
Kris Rice
  • 559
  • 1
  • 5
  • 23
1
vote
1 answer

Jar Shading With Dynamically Loaded Classes With Maven

I am using the maven plugin to shade and minimize a jar before I upload it to AWS lambda. However, I'm getting a runtime exception because of a missing class. As far as I know, this is due to some 'dynamic' class loading or something, but I'm not…
Dudro
  • 45
  • 5
1
vote
1 answer

How to utilize PropertyName in Geotools for a user-defined function?

I am attempting to use the geotools.org library (Version 24) to write a user-defined function to style my GIS map according to an external data source. The documentation for the GeoTools library includes this tantalizing paragraph in the section…
user1071914
  • 3,295
  • 11
  • 50
  • 76
1
vote
1 answer

Geotools StreamingRenderer point probleme when using Simplefeaturecollection instead of Simplefeaturesource using postgis database

I am developing my own cartographic server using leaflet and GeoTools in the back end, I use streaming render to draw a map in given bbox, all geometries are in 3857 coordinate reference system,here is a simple request from leaflet…
1
vote
1 answer

Getting coordinates in GeoTools

Thanks to Reading ESRI shapefiles from the InputStream in Java I can read my shapefiles and access every GeometryAttribute, but I also need to convert it coordinates in long/lat format, it might be 40°44′55″N, 73 59 11W or best 40.7486,…
ehrid
  • 95
  • 8
1
vote
0 answers

Log message: org.geotools.renderer.style: null input stream, could not load the font

Currently I am migrating a project to Java 11. In this project, we are using GeoTools to create a PDF file with geometries inside. For this PDF file we use a special font which is not available in the system. Since Java 11 we store this font in the…
Björn
  • 11
  • 3
1
vote
0 answers

Java open geotools

I am trying to test a tutorial provided in geotools. I am trying to run the following example provided in this link https://docs.geotools.org/stable/userguide/tutorial/raster/image.html. Because i am new to Java i use intellij Idea and i have…
1
vote
1 answer

Geotools splitting raster and merging it again doesn't work

first time posting a question here so I'm sorry for any error. We are trying to let the user choose a raster image (.tiff) so that it can be uploaded to hbase for processing and other operations. Since single images can be quite large, we are trying…
Revje
  • 66
  • 1
  • 6
1
vote
2 answers

How to download maven dependency as *.jar file?

I attempt to implement the example from here, but upon the Maven dependencies installation I can't find jar file amongst downloaded dependencies. My pom.xml looks like this:
JavaDev
  • 79
  • 1
  • 8
1
vote
0 answers

Can I parse a GML Surface from a DOM node in Geotools?

I have a set of small XML documents - AIXM, to be specific - that contain deep within them GML elements. For instance:
Steve
  • 726
  • 4
  • 10
1
vote
1 answer

Geotools OSM Tile layer Failed to load image, can't create an ImageInputStream

I'am trying to print an OSM tiles in a given bounding box using geotools and the tile client,i have implemented a wms service that can read a wms request and render the image in a given boudning box, the OSM layer is used as a base layer,i have…