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

Why can't I cast WFSFeatureSource into SimpleFeatureStore?

In the GeoTools Javadoc for Transaction (and in a few other places, such as blogs and so forth) they suggest lines like this for performing transactions on the database: SimpleFeatureStore road = (SimpleFeatureStore)…
AlbeyAmakiir
  • 2,217
  • 6
  • 25
  • 48
1
vote
0 answers

Geotools WFS dwithin request with geometryCollection queries empty geometry

I'm trying to do a WFS GetFeature with Geotools 18.1 but when passing GeometryCollection or MultiLineString as geometry, the GML geometry is empty and I get a 400 Bad Request error. I Wiresharked what was actually sent in the body, and discovered…
Morysh
  • 71
  • 10
1
vote
0 answers

how to use geotools in android (how add geotools lib to android)?

I want to use the Geotools library in my android code. But the library is not being added correctly. To use the library I used the following address and acted accordingly. "Gradle not imported dependency with ext:pom" I enter the following commands…
Ali Hosein pour
  • 220
  • 4
  • 19
1
vote
1 answer

Why does uDig's rendered map look much better than mine

I styled a layer with uDig and exported the style as SLD file. I then applied the same style to the a layer (same shapefile) in my code using Geotools. However, uDig's rendering of the map looks much better than mine. My project uses geotools…
Yemi Kudaisi
  • 163
  • 1
  • 7
1
vote
1 answer

How to output a map image to browser when using geotools to develop a wms service?

I'm using geotools to develop a wms service. I create a map layer and add it into MapContent. Then I develop a GetMap service. I display the map on the browser successfully, but the map location is always wrong. Like this: And the request…
leomessi
  • 69
  • 6
1
vote
1 answer

create geotiff from jpg with jgw file using geotools?

i have an image in JPG also crated JGW file using Affine transformation now i want to convert this jpg file with jgw file into geotiff how can i do that? thanks
1
vote
1 answer

Read and display 1 or more raster files in Repast Simphony

I am new to using GIS aspect of Repast. The agents have to get pixel values from multiple shapefiles and 2 raster files (based on lat, long), to decide their movement course at every tick. So far, I first created a geography, then added the raster…
Swapna
  • 31
  • 1
1
vote
1 answer

GeoTools Maven Issue - Import Confusion

I'm following a solution posted here which uses Java to convert square degrees to square metres. I'm having a problem with the maven imports. Specifically, following the GeoTools Maven Quickstart here, I'm still getting Cannot resolve method errors…
Mathomatic
  • 899
  • 1
  • 13
  • 38
1
vote
1 answer

How to add waypoint item in GeoTools

When looking the examples of the Geotools, i cant find the examples about adding waypoint into Map of GeoTools. So how can i add the waypoint into Geotools ?
ibrahimyilmaz
  • 18,331
  • 13
  • 61
  • 80
1
vote
0 answers

Is there a RESTful interface to create layer of MongoDB instance in Geoserver?

I'm trying to create layers in Geoserver using MongoDB instance. However I want to create the layer in geoserver using RESTful interface or using geotools function. Similar to how layers is created using PostGIS instance. I have tried creating the…
GeoFresher
  • 301
  • 2
  • 12
1
vote
1 answer

How can i draw a line surrounding all the polygons in a single layer in GeoTools?

I have written some code in Java using the GeoTools (v.22) library that opens a shapefile, takes all the polygons in it and divides them in different FeatureCollections based on a value associated to each; it then creates a layer for every…
KylesDev
  • 99
  • 1
  • 1
  • 9
1
vote
3 answers

Taking a wrong port (30015) number in geoserver when I try to create datastore,Database SAP HANA CLOUD

Geo-server taking the wrong port number when I try to create the datastore, because of that I'm not able to create the store. The data base is sap Hana cloud . From SAP Hana cloud I'm launching the geoserver 2.14 . In geoserver war I added…
Harish CHH
  • 104
  • 11
1
vote
1 answer

Why do i get a NoSuchAuthorityCodeException when creating a CoordinateReferenceSystem?

I have a coordinate in the format EPSG:3857 and need to transform it to EPSG:4326. For the transformation I use geotools. When looked up every example I could find but I seem to get an exception that is not explained anywhere. Here is what I try to…
Marcus Lanvers
  • 383
  • 5
  • 20
1
vote
2 answers

jts convert single polygon to multipolygon

Ho everyone I am using JTS 1.15 with geotools snapshot 21: I wrote a method with a Polygon Collection as input parameter and the output method is a MultiPolygon Geometry. This is working fine without one exception: I have also an union flag that…
F.M.
  • 193
  • 2
  • 8
1
vote
1 answer

shapefile do not save time part in date attribute

I want to save datetime in shapefile, but the date attribute only save the date part. For example, I put "Thu Feb 28 01:20:00 EST 2019" in date attribute, but when I print it from the feature I built, I got "Thu Feb 28 00:00:00 EST 2019". The user…
RWBY
  • 11
  • 2