Questions tagged [java]

An object-oriented cross-platform programming language developed by Sun Microsystems.

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

Java - Mac OS - GDAL/OGR missing libraries

I'm trying to read/access a geodatabase (.gdb folder) for extracting some data. I can access the database from terminal using >ogrinfo test.gdb.zip and as result i get using driver `OpenFileGDB' ...
user avatar
1 vote
0 answers
37 views

Load shapefile from local machine to database PostgreSQL

I have a method that imports shapefile to PostgreSQL (using GeoTools), it takes as arguments the path of the shapefile (it's working fine). The problem is I want the user to select a shapefile from ...
user avatar
3 votes
1 answer
112 views

3D intersection with JTS

Not sure this is the correct place to ask. I have no code to show, just wondering if this can be handled with JTS. Is it possible to handle 3D intersections with JTS? Given that we have two polygons, ...
user avatar
  • 45
2 votes
1 answer
32 views

"Layers" and "Layer Preview" tabs not working

I've just setup a new geoserver and installed some extensions. Now I'm unable to navigate to the "Layer" and "Layer preview" tabs. They just don't load. 2022-03-28 15:14:16,357 ...
user avatar
2 votes
0 answers
163 views

Converting Velocity ECEF to NED or LLA/Geodetic

I'm able to get a correct position from ECEF to Geodetic to NED with a relative footpoint and can verify using online conversion tools: https://www.oc.nps.edu/oc2902w/coord/llhxyz.htm https://www.ngs....
user avatar
1 vote
1 answer
45 views

Create layers of confirmed and unconfirmed alerts using select

I aim to create one layer with confirmed alerts + Date and one layer with confirmed alerts +Date from a dataset in GEE. The dataset has two bands: 'Alert' and 'Date'. Confirmed alerts are 2, while ...
user avatar
  • 43
1 vote
0 answers
157 views

Failing to deserialize geometry point data in Spring Boot REST API

I am working on a location-based REST API and so far everything is working fine, except for one controller which gives this error. I am new to this. 2022-03-16 16:28:37.842 WARN 7720 --- [nio-8080-...
user avatar
0 votes
2 answers
148 views

Parse GeoJSON polygons with holes library

We're trying to use polygons taken from OpenStreetMap and determine user locations. We're using geojson to parse the GeoJSONs we generate from OSM, but the deserialized polygons aren't being populated ...
user avatar
1 vote
0 answers
78 views

How to calculate the daylight saving time given a latitude and longitude [closed]

I've been using an algorithm (https://gist.github.com/assaflavi/fc8cf83c167558ebf3ab159b5c5b0df2) to calculate sunrise and sunset times given a latitude and longitude and it works fine but this ...
user avatar
1 vote
1 answer
87 views

How can I install Native JAI on GeoServer 2.20.x. & GeoServer 2.19.x

I'm currently setting up two GeoServers running on two separate Linux machines. One of the GeoServers is running version 2.20.2. and the other one is version 2.19.5. I'm trying to install Native Jai ...
user avatar
0 votes
1 answer
66 views

Basin code in Google Earth Engine

How to find 6digit in HYBAS_ID of "WWF HydroSHEDS Basins Level 7" database. Technical Documentation says that: Next 6 digits represent a unique identifier within the HydroSHEDS network; ...
user avatar
0 votes
0 answers
39 views

Add geometry to vector layer GEE

I have vector layers of the Congo that show the region, department and districts as FeatureCollections. However, for further analysis I need to add geometry attribute to them. I already tried to just ...
user avatar
  • 43
0 votes
1 answer
41 views

How to create buffer of raster without original area in it in GEE

I am quite new in GEE but got really stuck! I want to create buffers around concession areas (raster) of 1km. I first transformed my vector dataset into raster, reclassified the values to 1 and ...
user avatar
  • 43
1 vote
0 answers
50 views

locationtech simplified geometry - distance tolerance units

When using org.locationtech.jts.simplify, there is a parameter called distanceTolerance. What are the units in for this parameter? For example, feet, meters, km, etc. I'm not sure if this is relavent,...
user avatar
  • 205
0 votes
1 answer
170 views

GeoServer: Could not determine geoserver request from http request, Can't instantiate page, NullPointerException

I have a GeoServer instance on a closed network without immediate internet access, so it's been difficult to diagnose the several errors I'm seeing. Googling, I've found several other posts on here ...
user avatar
1 vote
1 answer
36 views

Find polygon corners using JTS [closed]

Assuming we have different JTS Polygon objects, visualized example A and B. How can we go on and find the corners/coordinates for each polygon (blue circles) using JTS? The polygons have multiple ...
user avatar
  • 45
1 vote
0 answers
38 views

OutOfMemoryError and EncryptionOperationNotPossibleException in Geonetwork 3.12.1.0

I'm experiencing some troubles with Geonetwork 3.12.1.0 and didn't find any solution, so please forgive me if this was asked before. We have a Geonetwork 3.12.1.0 running on Ubuntu Server 20.04.3 LTS ...
user avatar
  • 11
3 votes
1 answer
83 views

Coordinate transformation with NTv2 and cs2cs works in console but not in GDAL

Our Java application uses GDAL (v3.2.0) and I am trying to convert some coordinates from EPSG:31467 (DHDN GK3) to EPSG:25832 (ETRS89 UTM32). For this I downloaded the grid shift file BETA2007.gsb and ...
user avatar
2 votes
0 answers
39 views

GeoTools slow pane drag problem

I've created a map using GeoTools IntelliJ Quickstart. When I move the displayed map on the screen with the pane tool, non visible parts become visible on the screen appears as a blank white area ...
user avatar
0 votes
1 answer
50 views

Addlayer method reloads screen and the white screen seems in Java desktop application using GeoTools

I am trying to draw lines on map using GeoTools. Firstly I added a map layer, and while the program still is running, the user draws a line with mouse clicks. But every time addLayer method calls, the ...
user avatar
0 votes
0 answers
74 views

GeoServer WMS service not visible when upgrading Java version

I am currently using Azure WebApp services to run my GeoServer application. According to GeoServer's documentation the war file is compatible with Java 8 or 11. I have been using Java 8 1.8.0_181, ...
user avatar
  • 1
1 vote
0 answers
39 views

Using Java BuildVRTOptions​ to create a VRT file

I wish to dynamically build a GDAL VRT file from a java application. I really want to avoid driving the CLI from within the app. I can easily create the VRT file: final String vrtFilePath = "...
user avatar
0 votes
1 answer
375 views

How to convert WGS84 degrees coordinates to SK42 in meters in Java

How to convert WGS84 degrees coordinates to SK42 in meters in Java? Are there any code examples?
user avatar
1 vote
1 answer
52 views

Extract daily area average value of ERA-5 minimum temperature of 30 years using GEE?

I'm struggling in finding a way to extract daily minimum temperatures for a particular month (at present for january) and a study area (an imported shapefile as chamoli), for a selected period of time ...
user avatar
1 vote
2 answers
86 views

When reading a BSB/KAP chart file, I am getting incorrect run lengths. Many runs lengths are way too long

My java code for reading the run length portion of the stream is shown below. The run lengths being read in don't make sense. byte b = (byte) br.read(); //read a byte from the stream ...
user avatar
0 votes
0 answers
50 views

Convert GPS bearing to Cartesian angle

I have two GPS coordinates: Location A 25.07507, 55.14012. Location B 25.07571, 55.13975. The bearing between location A and location B is 332.9°. If we know that location A has a Cartesian point of ...
user avatar
  • 101
1 vote
0 answers
77 views

How to flip axis order in WKT/CRS with GeoTools

I'm trying to generate some WKT for a CRS where we've flipped the axis order to make it play nicely with shapefiles. For example, we've got some points in EPSG:2193 (NZ transverse mercator, in yx ...
user avatar
1 vote
0 answers
57 views

OpenLayers map preview code="internalError" Rendering process failed. java.lang.OutOfMemoryError: Java heap space

I am using geoserver 2.14.4 (Operating system independent runnable binary). Last couple of days, my server is gradually slow down. and after 2/3 days it will stop showing anything by showing below ...
user avatar
2 votes
1 answer
20 views

Create Style from SimpleFeatureCollection

Is it possible to create a Style from a SimpleFeatureCollection and SimpleFeatureType. I noticed that StyleBuilder has, public Style buildClassifiedStyle(SimpleFeatureCollection fc, ...
user avatar
  • 187
0 votes
0 answers
52 views

Iterate througn [Java.lang.double in JS

I have a Leaflet app with PostGIS and Geoserver at the server side. Some columns in PostGIS tables are of type Double[] and contain arrays of double values. I need to get these arrays into my app and ...
user avatar
2 votes
1 answer
60 views

Searching shapefile for zone containing coordinates in lat/lon format using GeoTools

I'm new to GeoTools and GIS generally. I have a shapefile containing feature polygons representing NY City taxi zones. I also have the coordinates in latitude and longitude for the pickup and drop-off ...
user avatar
  • 121
0 votes
0 answers
15 views

Which Option should be added to avoid white block when mosaic rasters using gdal_warp

I am using below codes to mosaic some raster files, but the result shows many white blocks. Did I miss any important option to avoid this? The codes: gdal.AllRegister(); String folder ...
user avatar
  • 109
2 votes
1 answer
37 views

Using ViewshedGenerate in Java (can't instantiate SWIGTYPE_p_p_char)

Using GDAL Java of this package: <dependency> <groupId>org.gdal</groupId> <artifactId>gdal</artifactId> <version>3.3.0</version> ...
user avatar
  • 1,836
2 votes
3 answers
219 views

Simplify a branching line string

I have been working on developing a GeoTools function to create a central label line for polygons. The idea was to grab the skeleton of the polygon and use that to place my label, however it turns out ...
user avatar
  • 74.7k
1 vote
2 answers
55 views

geoserverRestPublisher not publishing sld correcltly

Hi I'am using geoserver manager plugin for publishing my shapefiles and styles through my web application, but the problem is that the style is not publishing correctly. this is how it should be (...
user avatar
1 vote
0 answers
30 views

How to use Java for desktop GIS development on Linux system

I need to use Java language for desktop GIS development on Linux system. I need to perform read and write operations on FGDB databases, rasters, and vectors. First, I tried to use GDAL, but GDAL is ...
user avatar
  • 11
0 votes
0 answers
119 views

How to read and write Esri FileGeodatabase (FileGDB) in Linux by Java language?

I need to read and write Esri FileGDB in a Linux system (Centos).I have installed GDAL and compiled the Java package.Then, I tried to use FileGDB API to accomplish the task, but it does not support ...
user avatar
  • 11
1 vote
1 answer
116 views

Reading from PNG file in Java from using GDAL

I've used gdalwarp.exe to project a tif-file from EPSG:4326 to EPSG:32635 and storing it in the PNG-format: gdalwarp.exe -dstalpha -t_srs EPSG:32635 -s_srs EPSG:4326 -if GTiff -of PNG -et 0.125 -r ...
user avatar
  • 63
1 vote
1 answer
25 views

Diffing many geometries from single area

Using the JTS library, I create a square Geometry representing water and diff from it large numbers of geometries representing land. At high zooms (think, Scandinavia), this can take a long time. Most ...
user avatar
  • 155
0 votes
0 answers
97 views

Fatal MaxEnt Error: java.lang.NumberFormatException: For input string: "-∞"

I'm trying to use MaxEnt to project species distribution. It worked to project probability the first time, but when I've put in the projection layers directory it comes up with this error and then ...
user avatar
0 votes
0 answers
21 views

Showing text on map tiles

I'm using Java to generate vector tiles, and so far this works OK. The thing that I do not know how to do is - write country names to the tiles. I'm using currently org.locationtech.jts classes, and ...
user avatar
3 votes
1 answer
196 views

Spatialite - equivalent of ST_AsMVT

I managed to make vector tile server in Java, using some libs, and simple code. In first example, I used PostGIS and example of it is this code: public byte[] vratiNestoPostGis(Integer z, Integer x, ...
user avatar
0 votes
1 answer
73 views

Vector tiles from SQLite database with Java

Currently, I'm serving vector tiles exported from QGIS shapefile with Export to PostgreSQL function. Is there any simple Java library that could be used to serve these vector tiles from SQLite ...
user avatar
0 votes
0 answers
30 views

Load raster images with bounding box coordinates into PostGIS using Java

I have 10K+ aerial images and the images are in the jpg format. I have the bounding box coordinates for each jpg image (i.e. x_min, y_min, and x_max, y_max). My requirement is to save these images in ...
user avatar
  • 149
0 votes
0 answers
83 views

ECW support for Java development

I'm trying to add support for the ECW file format in a Java application the last few days without any success. My development env is OS: Windows 10 (x64) JDK: openjdk 15 IDE: Eclipse On my pom I added ...
user avatar
2 votes
1 answer
74 views

How to increase shapefile creation speed from CSV file in GeoTools

I want create shapefile from CSV. Here is my code File file = JFileDataStoreChooser.showOpenFile("csv", null); if (file == null) { return; } final SimpleFeatureType ...
user avatar
0 votes
1 answer
31 views

Geo Tools Conformal and Distortion Transform

I'm using WFS service to get geometry values of some Australian land parcels based on the local grid it belongs to. I receive the coordinates in WSG84 and I'm converting it to relevant coordinate ...
user avatar
0 votes
1 answer
11 views

ArcGIS Java Configuration Tool (JCT) Error: could not creat a registry key

I am trying to select debugging options in the Java Configuration Tool, ArcGIS Desktop 10.5. I have done this before, many times, in 10.4. But now, in 10.5 on a new computer, I am getting this message:...
user avatar
  • 105
2 votes
2 answers
141 views

How increase speed of counting CQL.toFilter("CONTAINS(the_geom, POINT (lat lon))") on GeoTools with Java

How can I increase speed of counting? I want to select points which is included by shape (GIS shapefile .shp). I have 5 million points and 10 shape files. qry="CONTAINS(the_geom, POINT (69....
user avatar
3 votes
1 answer
363 views

PSQLException: ERROR: operator does not exist: public.geometry && public.geometry

I have database with PostGIS already installed. I am running the following query from pgAdmin and I am successfully able to run it without any errors. But when I run it with Java, I am getting the ...
user avatar
  • 183

1
2 3 4 5
17