Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [geotools]

GeoTools is an open source Java library that provides tools for geospatial data.

0
votes
2answers
28 views

Reading a GeoJSON via Java GeoTools API issue

I'm trying to read this GeoJSON from this string: { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry":...
-1
votes
0answers
9 views

Write coordinates to the polygon of the shapefile by gestools [closed]

I have an array of coordinates and how to replace the existing coordinates in the polygon with it.
-1
votes
0answers
35 views

How to validate angle in Geotools

I have a point layer, I need to calculate angle at each point. Labelled are the angles which I got by using this with example triple set of points (13.984696149844021 80.08592760033726), (13....
1
vote
1answer
42 views

Modifying coordinate values of MultiPolygon using GeoTools?

I can already get the vertex coordinates of the polygon, but I want to modify the coordinates and write it back to the source file. This is part of the code I read the coordinates. try{ while (...
0
votes
0answers
27 views

KML parser in GeoTools won't parse TimeStamp

.... <Folder> <name>FooName</name> <Placemark id="3"> <description><![CDATA[ Foo HTML stuff ]]></description> <TimeStamp> ...
0
votes
2answers
23 views

Java GeoTools API: getInteriorPoint does not work on an intersection between Polygon and MultiLineString

I'm working on a Java project using GeoTools API that want to get the interior point getInteriorPoint(), from the geometry coming from an intersection between a Polygon and a MultiLineString. Please ...
0
votes
1answer
17 views

Zoom GeoTools JMapPane to retain data area on resize

By intention, when the JMapPane is resized, the contents of the pane do not change [1]. So, as the application window gets narrower, content from the right-hand side is trimmed off. An alternate ...
0
votes
1answer
26 views

GeoTIFF / Geotools / Mollweide / customer projection not recognized

Although I got a hint from Ian, I still have a problem to read a GeoTIFF in Geotools. I ask this as a new question so that I can put all info. The GeoTIFF is from http://cidportal.jrc.ec.europa.eu/...
2
votes
2answers
21 views

Geotools CQL to OGC filter

I'm trying to convert a CQL filter to OCG. I followed this example: https://blog.ianturton.com/geotools/code/ogc/2015/03/18/Generating-OGC-Filters.html In line with org.geotools.xml.Configuration ...
2
votes
1answer
24 views

Geotiff Mollweide and geotools

I am new to GIS and I want to read population data from a GeoTiff Grid using the java geotools library. The following throws a runtime error GridCoverage2D image = new GeoTiffReader(f); gives ...
2
votes
1answer
25 views

Specifying EPSG transformation method in GeoTools?

I am a software developer who knows a bit about Gis/Geodesy, but I am not an expert so I might misuse terminology somewhat. I have been tasked to extend an app in Java and have a need to transform ...
1
vote
1answer
16 views

GeoTools CRS.findTransform suddenly failing

I have a body of users using an Eclipse RCP-based Java desktop app (32-bit JRE1.7, Windows 7) that uses GeoTools for world/screen projection handling. This morning the app has started failing for ...
2
votes
1answer
25 views

How to control output of Jiffle Processes in GeoTools so to return float 32bit instead o double 64bit

While developing custom map algebra in GeoTools, I adopted Jiffle. (see : Creating custom Operation for encapsulating some map algebra using GeoTools?) This allowed very easy implementation of logic ...
2
votes
1answer
17 views

GeoTools change buffer style

Is it somehow possible to change the buffer style of the build in GeoTools buffer() function? Or is there a User Definded Function for that? I just saw a different buffer function where one could ...
0
votes
1answer
26 views

Creating custom Operation for encapsulating some map algebra using GeoTools? [closed]

In GeoTools, I need to perform a one-to-one pixel computation between a bunch of GridCoverage2D. In short: some map algebra. As I understood I can do things like summing values of coverages using: ...
0
votes
1answer
31 views

GeoTools reprojecting SimpleFeatureCollection return invalid datatypes

Hard to wrap the question into a title. I build a custom ReprojectionClass today to transform a whole SimpleFeatureCollection into a different CRS (currently hard coded to EPSG:3857 The ...
2
votes
1answer
27 views

How can I label the coordinate position of the grid coordinate lines

I need to display the coordinates of the grid lines. I saw this article 'Fun with Graticules', which has much common with that I want to do. But I still have a question. How did you create the new ...
1
vote
1answer
85 views

Converting GeoJSON to shapefile using GeoTools Java

I am implementing a web service in Java which takes a GeoJSON file as input and converts it into a shapefile. My code looks something like this :- @RequestMapping(value = "/uploadFile", method = ...
1
vote
1answer
29 views

Create dynamic circle/polygon from specific lat/long using GeoTools

I have a dataset of lat/long that I would like to match on dynamically generated circle/polygon from specific point with different radius. I have already completed how to match lat/long with custom ...
0
votes
0answers
19 views

epsg_operations.properties

I am trying to include an epsg_operations.properties definition into my Java /Geotools Project. I thought it would be the best solution to include the gsb-File for a GRID-Transformation. So I inserted ...
1
vote
1answer
48 views

Distance between a line and a specified waypoint in lat long

I'm based in the UK and I'm trying to determine the distance in meters between a line (created via a set of lat lng waypoints) and a specific point (also defined in lat lng).I've had a look at a ...
1
vote
2answers
225 views

GeoJSON to KML conversion

Is it possible to convert GeoJSON to KML format using geotools. I am trying to figure out this using Java but I can get results only using node js.
1
vote
1answer
20 views

Coordinate Reference System change problem in GeoTools

I try to convert some coordinates from ETRS89-LAEA (EPSG:3035) to WGS84 (EPSG:4326) with geotools. Here is the code: Coordinate c = new Coordinate(3847988.7, 3161178.2); MathTransform mt = CRS....
1
vote
1answer
42 views

Save geometry as image

I want to save the geometry as image. This geometry should look like ICAO areas, but I have got the whole world map. Is it possible in Geotools to save exactly that part of the world map which I need, ...
0
votes
1answer
53 views

GeoServer s3-geotiff module with custom S3 provider fails

I'd like to use the s3-geotiff module within GeoServer with a custom provider (Minio). The minio server is running properly and I could reach the tiffs in the bucket from a variety of s3 tools. ...
0
votes
1answer
56 views

Troubles with reprojection

I want to draw a polygon on the world map in different map projections, for example, in mercator proj or stereographic one. They must correspond to ICAO ares G (https://aviationweather.gov/satellite?...
2
votes
1answer
26 views

Homolosine projection with GeoTools

I would like to use Goode's Homolosine projection with GeoTools. This projection is fully supported by both PROJ and GDAL. However, when I try to create a CoordinateReferenceSystem object with this ...
1
vote
2answers
39 views

GeoTools correct use of ReprojectingFeatureCollection

I have trouble understanding the use of the function ReprojectingFeatureCollection. Here is my code: try { Double buffer = 500.0; String attributeBuffer = ""; ...
0
votes
1answer
43 views

Converting bulky shapefiles (54 MB) to GeoJSON

I am trying to convert my shapefile to GeoJSON using the below code snippet: StringWriter writer = new StringWriter(); String geoJson = null; FeatureJSON fjson = new FeatureJSON(); fjson....
0
votes
0answers
24 views

How we can get respective WMS layer from a WFS layer?

We need to get the respective WMS layer here, ArcGIS Server WMS layer names do not match to WFS names so name matching doesn't work import org.geotools.data.DataStore; import org.geotools.data.ows....
0
votes
0answers
20 views

Geotools access attribute table on Geoserver

I want to access the attribute table of a SimpleFeatureCollection I have created within a WPS process by clipping it out of a Vectorlayer stored on Geoserver. How can this be done? Is using an ...
1
vote
0answers
30 views

Inaccurate results when converting coordinates to EPSG:53004 with geotools and

I am not very well aquainted with geographic data, but I'm working on a student project, where I have to position points from GPS coordinates around Warsaw on a particular shapefile map. It came with ...
0
votes
0answers
31 views

Custom Geotool function that access a GeoServer's Datastore

I'm following this tutorial to implement a custom Geotools function: http://docs.geotools.org/latest/userguide/tutorial/function.html I want to implement a custom Geotools function that should access ...
2
votes
0answers
77 views

GeoServer's shared DB connection

I have a PostgreSQL/PostGIS table "geometry_table" that has a 1-to-many relation to another table "properties_table", where each geometry has many properties. These properties hold style values of ...
1
vote
1answer
96 views

How to set SRS to 'EPSG:4326' in geotools?

I have the following code, referenced from my previous post: https://stackoverflow.com/questions/52554587/add-new-column-attribute-to-the-shapefile-and-save-it-to-database-using-geotools. So what I am ...
1
vote
1answer
35 views

Add geometry line to the map

I'm trying to test the code example on the page http://docs.geotools.org/stable/userguide/tutorial/geometry/geometrycrs.html I copied this example into eclipse Transaction transaction = new ...
1
vote
1answer
66 views

Geoserver How to call existing functions inside new WPS process

I am pretty new to Geoserver and programming processes for it. I having trouble to find the information I need. Is it possible to call a existing function inside my own WPS class? I want to clip some ...
1
vote
1answer
42 views

Extra file generated while writing exporting collection to csv

I am exporting csv file from simple feature collection with help of gt-csv the feature collection is coming from db. Export is working fine but i am seeing another temp file generated in the same ...
1
vote
2answers
42 views

Which is the right version maven repository for geotools postgis?

The documentation seems to indicate that the right maven repository to use is: <repository> <id>osgeo</id> <name>Open Source Geospatial Foundation Repository</...
1
vote
1answer
34 views

Generating legend from sld

I have and SLD with following rule <se:Rule> <se:Name>Primary Pole</se:Name> <se:Description> <se:Title>Primary Pole</se:Title> </se:...
1
vote
1answer
23 views

AUTO:42003 Orthographic projection outside valid area

When running the following code to reproject a epsg:4326 countries file to orthographic: newCRS = CRS.decode("AUTO:42003,1,-100,45"); mapFrame.getMapContent().getViewport()....
0
votes
1answer
28 views

GeoTools MapFrame statusbar set reference system list empty

I'm using geotools.version = 20.0. After debugging the set reference system functionality, the following is executed but the codes list is empty: CRSAuthorityFactory fac =ReferencingFactoryFinder....
0
votes
1answer
32 views

Postgis SQL schema for features expected by GeoTools

I am building a small application which uses postgres and has a couple of tables which have a postgis polygon as one of their columns. I was thinking of using a Geotools DataStore rather than querying ...
3
votes
1answer
88 views

Geotools JTS, find most distant points in polyline or polygon?

is there any convenient API in JTS that would help to find two most distant points in line find two most distant points in polygon
-1
votes
2answers
116 views

Support for WFS 2.0 in QGIS 3.2.3 or geotools [closed]

I have problem with this WFS server: http://mapy.geoportal.gov.pl/wss/service/PZGIKINSP/httpauth/rest/services/PZGIK/PRG/GeoDataServer/exts/InspireFeatureDownload/service?service=WFS&request=...
1
vote
1answer
55 views

Get UTM Zone from GeoTIFF (geotools java)

I've loaded a GeoTiff successfully in with geotools (21-SNAPSHOT), but I'm having trouble accessing the referenced UTM zone. The code to read in the file is here: File tiffFile = new File(filePath); ...
1
vote
1answer
31 views

FeatureJSON is not setting bounds

I am using FeatureJSON from geotools to read in a GeoJson file containing a FeatureCollection and convert it to a SimpleFeatureSource. It all works fine except the feature bounds are null, so if I try ...
1
vote
1answer
51 views

Identifying dangles and hanging roads in a map in geotools

Is it possible through geotools to identify and mark all the dangles and hanging roads(lines) in a .shp file representing a map. Any example would help me proceed forward. So far I have found the ...
2
votes
1answer
92 views

Creating buffer around features using GeoTools?

I want to develop a simple GIS application using GeoTools. I have looked at the tutorials but i could get to much meaningful from them. I have a simple JMapFrame to which add can add a featureLayer ...
1
vote
1answer
32 views

Generate Dbf file according to the modified differenced FeatureCollection

I am working on geotools where I had created a FeatureCollection having the difference of the other two FeatureCollection s. I referred below link for this Comparing two shapefiles(layers) and ...