Stack Exchange Network

Stack Exchange network consists of 174 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 [java]

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

0
votes
0answers
5 views

Getting t single layer Latitude and Longitude for constant Time and Depth from NetCDF file in Java?

I am trying to read a NetCDF file with 4 parameters (Time, Depth, Latitude, Longitude), I want to read the file at a constant Time and depth. Right now I am reading the whole file and then getting ...
-1
votes
1answer
15 views

Seeking java code to convert from DLTM (EPSG 3997) to WGS 84 coordinate system?

I want a Java function where I can pass WGS 84 X and Y and then return corresponding DLTM values. I was able to convert to DLTM using ArcGIS JavaScript client SDK, but couldn't get the formula to do ...
0
votes
0answers
26 views

Google Earth Engine pull least cloudy Landsat scene by location using conditional

My goal is to write code that will pull all Landsat 8 scenes available for a given month in a given year for the US, add a cloud score band to each image, and if there are multiple images for the same ...
1
vote
1answer
19 views

Error during MGRS conversion for large latitudes

I'm using Nasa's Worldwind java API to convert MGRS strings to lat/lon. However, when my latitude is greater than 85 degrees or less than -85 degrees I get an error. java.lang....
1
vote
0answers
20 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 ...
2
votes
1answer
25 views

Determining if route self intersects using Java? [closed]

I have a sequence of coordinates (lat,lng) defining a route. How can I determine whether this route is self intersecting? I am trying to implement a Java method for this, but I have been ...
4
votes
2answers
42 views

OSM Line 'way' from PostgreSQL (PostGIS) to Java Linestring (from JTS library)

I would like to read the data from PostGIS OSM database to Java object. I have 'planet_osm_line' table. I'd like to get 'osm_id' and 'way' column read by ResultSet, as here: stmt = con....
1
vote
1answer
44 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
28 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
0answers
49 views

Vector Tiles in a JavaFX application

I currently building a desktop routing application using Java and JavaFX plus MapBox and Leaflet. My problems occured when i try to load a vector tile into a WebView component. If i'm using this HTML ...
1
vote
0answers
29 views

Can be Neo4j Spatial data exposed to GeoServer via the Neo4j Geoserver Plugin being edited via WFS-T protocol?

I'd like to set up some data storage as Neo4j as I need the advantages of graph databases for may data, but I'm not sure that the data would be spatially editable via WFS-T and Geoserver. Does Neo4j ...
0
votes
1answer
25 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
64 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
vote
1answer
30 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); ...
0
votes
1answer
40 views

Classification based on NDVI values of two images

I want to find the areas where the NDVI value were higher then 0.4 at the end of April and NDVI values were lower then 0.3 at the end of June. I have tried to make it using below demonstrated script, ...
1
vote
0answers
20 views

Reading backscatter value of each pixel of Sentinel-1A images in Java? [closed]

I am new to working with Sentinel-1A images but have better knowledge of Java. I want to get backscatter value of each pixel of Sentinel-1A image, store it and then get the frequency of each value. ...
2
votes
1answer
192 views

Convert list of Java objects with JTS geom to GeoJson

I have a list of Java POJOs that all have a JTS geometry associated with them (Point) - a list of POIs, basically. I want to output them as GeoJson (FeatureCollection, Feature etc.) jackson-...
1
vote
1answer
24 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 ...
3
votes
2answers
92 views

Is there a Java API for in-memory geo indexes?

My application is backed by PostGIS. There is a particular set of tables which have one of their columns being a geographic polygon. They are relatively small in size (few thousand rows) and can ...
1
vote
1answer
28 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 ...
3
votes
1answer
33 views

Geotools: Set custom primary key

I have a script which reload data from dbf file and create a new table in postgres database using geotools plugin. My problem is when geotools reload fields name from the file it adds a new field fid ...
1
vote
1answer
21 views

Create a Feature from a Boundary

I'm attempting to create a Feature based on a Polygon defined by a ReferencedEnvelope of the provided Feature (in this case a country). However I am seeing a CRS error NoSuchAuthorityCodeException: ...
0
votes
0answers
39 views

Geoserver custom development WFS - WPS

my goal is to clip features returned by WFS requests to the bbox parameter using Geoserver. My strategy is to perform the primary request, send the resulting features to GeometryClipper and then ...
2
votes
0answers
44 views

Add new attribute in shapefile using Java: Geotools [duplicate]

I want to edit my shapefile by adding a new column "ID" and assign a value to it. I am trying to achieve this using Java Geotools. Here is the snippet code: File inFile = new File("/abc".shp"); ...
2
votes
1answer
36 views

Speed up Geotools Vector Grid processing

I am using Geotools Vector Grid on a FeatureSource (shapefile) that been projected to "AUTO:42001". Units for the map are then in one meter increments. When the FeatureSource is a large country (like ...
0
votes
1answer
78 views

Integrate QGIS Plugin with Java Project [closed]

I have a Java Application. I am using QGIS to solve one such module of my Java Application. I have written code in python console within QGIS.Is there any way to integrate both of these? I am ...
1
vote
1answer
62 views

Transforming a single-band GeoTIFF into an RGBA PNG file using GeoTools

I'm fairly new with GeoTools. I'm using it in order to generate GeoTIFF files that have a single band, with values between -1 and 1, or NaN. An example of such a file is available here: https://m-...
0
votes
1answer
79 views

How realistic is it to be able to build a dynamic map with ~50k points that change colour depending on supplied data? [closed]

I'm a programmer, but I'm new to GIS. I want to build a map that displays the status of some IoT devices I work with. My ideal vision is a world map, which would fill the screen, but for now, ...
1
vote
1answer
40 views

Return A Path from multiple point in Geomesa

I am trying to visualise the historic of a vehicle in a specific area , I am writing now a query to get all points off a this vehicle in this area with this : FeatureStore feature = (...
0
votes
0answers
65 views

GT06 Keep Sending Login and Heartbeat Packet

I am creating a GPS track application in Java via scoket programming. After setting up everything, recived login packet and sent response by my server. After sending response GPS sending heartbeat ...
0
votes
1answer
59 views

Is there any method to create WMTS GetCapabilities response in xml using java libraries?

I am creating WMTS server side. The problem is that I cannot find any solution where I will be able to generate GetCapabilities xml response in java using some libraries like geotools or similar. Can ...
0
votes
1answer
36 views

Taking an arbitrary object in Java and creating a shapefile out of it?

Let's say I have a data class in Java that essentially has title geo (WKT String) Other irrelevant metadata I want to create shapefile from lists of these types of objects using something like ...
0
votes
0answers
25 views

OpenTripPlanner API Elevation values unclear

I'm using the OpenTripPlanner Planner API to find directions. The API returns XML with the geometry of the line (2D) and the elevation data separately, for example The 2D line geometry is as ...
0
votes
0answers
39 views

Why 'Simple' example is not giving in Mapfish pdf report?

I am using windows. I installed tomcat 8.5. Then deployed print-servlet 3.9 war. There are some example print apps. I tried to print "Simple", but it didn't build any pdf report, gave some error ...
1
vote
0answers
46 views

Algorithm or library for buffer zone for lat-lon (wgs) coordinates in global scale

Can anyone point to generic algorithm or library for buffer zones if the source data is in WGS84 degrees? The buffer width should be in meters, as buffer in degrees it generally does not make much ...
0
votes
1answer
34 views

OpenTripPlanner - Server won't start

I was following this tutorial to learn how to setup and run OpenTripPlanner : https://github.com/marcusyoung/otp-tutorial/blob/master/intro-otp.pdf Everything goes well, until I wanna a start the ...
-1
votes
1answer
99 views

Get PostGIS geometry data and display it on map using GetMapRequest

How can I get the data from PostgreSQL db and display on map using GetMapRequest? I have done connecting the PostgreSQL db which contains the geometry data. Now I want to redirect that data to map ...
0
votes
0answers
80 views

How use GDAL in java?

I use a GDAL command for creating tiles from an ecw file as follow: gda2tiles.py --profile=mercator -z 1-8 me.ecw me Now, I want to run this command from a java application. How do I do that?
0
votes
0answers
63 views

Render Heatmap using Geotools from DefaultFeatureCollection of Point objects producing black area?

I am trying to render a heatmap using geotools. However, whenever I try to using HeatmapProcess I just get a black box. Here is my code for creating the GridCoverage2D object and rendering it: ...
0
votes
1answer
71 views

Mod_tile alternative for Tomcat?

I have been running a mod_tile + Mapnik + Renderd + PGSQL solution to host local OSM tiles, as described in the switch2osm guides. I recently put a lot of time in recoding my project to a Tomcat based ...
1
vote
0answers
156 views

Receiving Data From GPS GT06 in java

Am developing a fleet application where i need to track my vehicle movement. and store into mysql db. Am using gt06 gps with a sim card. Created a java file for checking that gps is sending the data ...
1
vote
0answers
29 views

GDAL Java Bindings .SetWellKnownGeogCS error

I am using GDAL 2.3.0 and Java bindings from http://www.gisinternals.com/query.html?content=filelist&file=release-1911-x64-gdal-2-3-0-mapserver-7-0-7.zip I would like to create a SpatialReference ...
0
votes
0answers
31 views

Using ESRI ArcGis Java SDK with Oracle SDE versioned tables

I might be approaching this wrong, but we are researching options for making a REST API (Spring, JPA) with functions that will store geometries and metadata in an Oracle 12 SDE ArcGIS database. ...
0
votes
1answer
64 views

GeoTools and GDAL: CRS WKT

I would like to achieve the same output as for GDAL using the GeoTools library: CoordinateReferenceSystem crs = CRS.decode("EPSG:32632"); String wkt = crs.toWKT(); System.out.println(wkt);...
1
vote
1answer
72 views

Geotools 12.3 - Create DataStore from WFS Service ArcGIS Server

I'm trying to create a DataStore in Java with Geotools 12.3. With WFS services in geoserver works fine, but with WFS services in ArcGIS doesn't work at all. This is the exception: WARNING [net....
0
votes
0answers
29 views

Downloading OpenStreetMap and importing into WorldWind Java? [duplicate]

In my application I should display OpenStreetMap of world (at least Specific Country). From where should i download the OpenStreetMap and how to import in world wind java Application?
1
vote
1answer
608 views

How to set up GDAL Java Bindings for Windows with OSGeo4w?

I've been searching for ways to use java bindings for GDAL and installed the OSGeo4W packages QGIS, GDAL, and GrassGIS using the "Express Desktop Install" method. After installing and confirming the ...
0
votes
1answer
78 views

Generating OSM map without HTML rendering but PDF rendering with iText?

Is there a way to create an OSM map by a java bean, without displaying it in a web page, but instead stamping it inside a PDF which is generated with iText 5? In my case, I want to generate kind of a ...
2
votes
1answer
332 views

ERROR4: File not supported with GDAL

This is my first time trying to use GDAL with java bindings and it's not easy... GDAL 2.3.0 Libraries & java-bindings built on linux code on Eclipse with gradle & shared lib ok Code example :...
3
votes
1answer
62 views

gt-geojson not able to read featurecollection

I have a geojson file with different type of Features like Point line and Polygon as here {"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[77....