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
0 answers

Retrieve WFS Map Content with Geotools in Java

I am trying to retrieve Map content via WFS Geoserver connection in Java with Geotools 18.4. But I am getting the following error: Content type is required for org.geotools.data.ows.Response. The idea is that i want to map features (Position and…
Chris S.
  • 21
  • 2
1
vote
2 answers

Impossible to get CRS with tomcat : org.opengis.referencing.NoSuchAuthorityCodeException

I'm having a weird situation. I use geotools to project rasters and it works for example CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:3857"); GridCoverage2D projectedImage = (GridCoverage2D)…
Geek Junior
  • 137
  • 4
  • 11
1
vote
1 answer

Geotools calculate intersection area between two geometries needed

I'm new to Geotools and I created two geometries (two polygons for example) and I want to compute the percentage of the intersection area over one of the geometries. //First polygon GeometryFactory geometryFactory1 =…
Bob
  • 86
  • 1
  • 12
1
vote
1 answer

Creating a wedge shape with Geotools

I am on the hook for creating a service which will create a shape based on data provided with a center point. I am working with geotools which I am not very experienced with, however I am getting more familiar with it. I am receiving data which…
Chris D.
  • 47
  • 7
1
vote
1 answer

Java or scala, GeoTools or GeoTrellis, how to convert sentinel 2 data to Multiband geotif

I am trying to process Sentinel 2 data from (example) http://sentinel-s2-l1c.s3-website.eu-central-1.amazonaws.com/#tiles/10/S/EG/2016/10/12/0/ The jp2 files are not georeferenced, and I need to put all the jp2 files as bands in a geotif. I have…
Mark Giaconia
  • 3,844
  • 5
  • 20
  • 42
1
vote
1 answer

How to create and populate shp file with GeoTools API

I need to create an empty shape file and populate it with data from my java colletion. Can someone show me an example of how to achieve this? Thanks in advance.
1
vote
1 answer

Is there support for geodesic DWithin query in geomesa?

I am struggling with DWithin queries in geomesa. I have ingested many geo points from OSM and want to make DWithin queries. I have the following code for query: val query = new Query("t1", ECQL.toFilter("DWITHIN(geo_point, POINT (14.453943…
d-n-ust
  • 122
  • 1
  • 9
1
vote
1 answer

How to drag and drop multiple points in geotools on map

I want to drag and drop multiple points in geotools. I know how to select multiple points but unable drag them to different location. Thanks in advance.
hoshi
  • 11
  • 3
1
vote
1 answer

Why can't GeoTools find MutablePicoContainer#registerComponentImplementation method?

I just started using GeoTools and am trying to generate a KML. I followed 2 main examples for my application, but I am seeing this weird error where gt-xsd-core cannot find this method registerComponentImplementation from the MutablePicoContainer…
wheeleruniverse
  • 1,511
  • 2
  • 20
  • 37
1
vote
2 answers

Multithreaded Geometry loading with GeoTools

Hey StackOverflow community, I am currently trying to write a little tool, that reads a shapefiles geometries (Multipolygons / Polygons) and writes the WKT-representations of those into a text file. To do so, I am using GeoTools and I managed to get…
1
vote
1 answer

GeoMesa: Polygon creation fails with some coordinates

I am creating a polygon as a geom attribute in a SimpleFeature, and testing it with various geospatial coordinates, but I am finding that some coordinates work with POLYGON and others raise an exception. For example, this bounding box in South Korea…
1
vote
0 answers

Image reprojection

I have a GridCoverage2D in EPSG:4054. I want to transform it to EPSG:4326. I have tried to do it this way: /** gc2d is an GridCoverage2D in EPSG:4054 */ CoordinateReferenceSystem targetCRS =…
1
vote
1 answer

Geotools PolygonExtractionProcess is not working

I want to convert a raster file into a shapefile. I am creating a GridCoverage2D object and want to use the execute method of Geotools PolygonExtractionProcess class but this method is not executing. I sadly cannot find any useful example usages of…
sLicK
  • 25
  • 3
1
vote
1 answer

Why can i not import geotools RasterToVectorFactory to my project?

I am currently trying to convert a raster file (.tif) into a vector file of polygones. I tried using geotools (version 17 or 19) but the import org.geotools.process.raster.RasterToVectorFactory could not be resolved with any of these versions. I…
sLicK
  • 25
  • 3
1
vote
2 answers

why is geotools throwing MathTransformFactory when running as part of a Java EE 6 app?

I'm writing a small Java EE 6 Web Service application that is for converting ESRI Shape Files and passing the data into another application. I have the application working fine as a command line app. However whilst porting the code, it has started…
Grant Collins
  • 1,781
  • 5
  • 31
  • 47