Questions tagged [java]

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

Filter by
Sorted by
Tagged with
2
votes
0answers
25 views

How do I read the GPS data from a GPS device using Java

I want to read data from a GPS device connected to my laptop and find the latitude and longitude. I searched a lot about it but could only find Android related programs. How do I read the GPS data ...
0
votes
0answers
11 views

Serve WorldBoundaries + Cities as VectorTiles

im currently moving from mapnik to vectortiles (mbtiles). In mapnik I had two rather small shapefiles (~20mb) that contained the world boundaries and the names of the biggest places. I could use for ...
0
votes
0answers
8 views

How to fix Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user ) [duplicate]

I am working on project using GeoServer, PostgreSQL and docker. I am newbie in all these technologies. I publish new layer in GeoServer and when I try to preview, my browser tries to download instead ...
1
vote
0answers
26 views

Reading, displaying and modifying a raster using Java

I am new to the Geotools library. The idea is to display and be able to modify a raster in java with the said library. I referred to the code of MARK. According to the description of the test class, ...
1
vote
0answers
27 views

Detecting if a geocoordinate point is land or ocean in Java

I'm trying to find whether a given location with latitude/longtitude is a land or water. Is there any library in Java that gives me a result of my question?
1
vote
0answers
45 views

How to deserialize geoJon input to locationtech.jts.geom.Geometry [closed]

I have following input to a Spring ReST endpoint: { "featureType": "feature", "geometry": { "type": "Point", "coordinates&...
1
vote
0answers
49 views

Error while creating PostGIS entity with Hibernate and GeometrySerializer : No qualifying bean of type 'GeometryParser<?>'

I tried to create a simple application with a geometry persistent layer (Spring boot with hibernate-spatial) Here is my Entity class : // Annotations from lombok project @NoArgsConstructor @...
5
votes
2answers
168 views

Remove/Fill holes in Polygons from a MultiPolygon using JTS Topology Suite programmatically

There are several questions/answers using ERIS,etc. like: Remove holes from polygon But I am having a challenge applying the solution programmatically using the JTS Topology suite only. Below is an ...
0
votes
0answers
36 views

Enable Mosaic Native Acceleration in GeoServer 2.17

I am trying to optimise my server's GeoServer configuration for serving WMS. My server is running Ubuntu 19.10. I'm following the 'GeoServer on steroids' guide which recommends enabling 'Mosaic Native ...
0
votes
0answers
35 views

getting convert X and Y to lat and long

I have a table called IK_TEMP and it contains columns called data, range . String sql = "SELECT DATA, RANGE FROM IK_TEMP"; try (Connection conn = this.connect(); ...
1
vote
1answer
39 views

Tomcat 8.0 and GeoServer 2.17 on Windows Server, trouble upgrading JDK to latest version [closed]

I have Windows server running Apache Tomcat 8 and GeoServer 2.17. The JDK installed when setup is older, JDK 1.8.0_73. I've now installed JDK 1.8.0_251. I changed my global env variable JAVA_HOME=C:...
3
votes
0answers
46 views

Calculate meter offset around decimal degree position

I have a position given in decimal degrees (x.xxxxxxxx and y.yyyyyyyy). I need to draw a rectangle around it. The center of the rectangle matches the position. The dimensions of the rectangle is given ...
2
votes
1answer
57 views

GeoTools ShapefileReader “Random Access not enabled” when trying to read files edited by QGIS 3.12?

I have some code where the relevant part looks like this: private static List<GisShape> shapes(String shapefile) { DataStore dataStore; try { dataStore = getDataStore(...
2
votes
1answer
33 views

How to retrieve the type of CRS (geographic or projected)?

Is there a way with GeoTools to know whether a CRS is geographic (in degrees) or projected (in meter) ? I have tried empirically with the following code (based on a check of the CRS unit) but I am ...
2
votes
0answers
36 views

Can't find geotools class in jar file/Maven dependency Android app [closed]

I am creating an Android app and using an extension from Maven dependency. This extension use geotools classes but when I compile and execute the app I have the following error: 020-04-20 21:51:52....
0
votes
0answers
52 views

Inserting X,Y to Geometry in Spring Boot and PostgreSQL?

I use @query to Insert X,Y to Geometry in PostgreSQL. @Modifying @Query(value = " insert into mypoints (name,geom) values (:name,SRID=4326;POINT(:x :y))", nativeQuery = true) @Transactional void ...
0
votes
0answers
8 views

GeoProcessor Dissolve problem with java

I used to write a dissolve method with C#, it worked well. But, when I try to rewrite it by java, the problem came. That's the code: IGpValueTableObject pObject = new GpValueTableObject(); ...
0
votes
0answers
13 views

ArcGIS SDK JAVA How to display only raster (and not basemap)

I wouldike to display only raster file on my application and not basemap. So I let the constructor of ArcGISMap empty like this : // create a map with a basemap and add it to the map view map = ...
0
votes
1answer
31 views

Problems to deploy latest version via Java installer and Tomcat8 inside OSGeoLive 13 VM [closed]

For a presentation of Geonetwork in our group I wanted to have the latest version of GN (v3.10.2) instead of the one implemented in the VM (3.2.1?) that was working flawlessly. (Awesome work to be ...
1
vote
1answer
25 views

Polygon not drawing correctly

I have a series of points I would like to connect into a polygon but it isn't drawing correctly, You'll see the problem. Coordinate[] xyarray = xycoords.toCoordinateArray(); ...
0
votes
1answer
50 views

Alternate of intersects ?# operator in postgres

Is there any way to find if a path is intersecting with a box in postgres without using ?# or using an alternative? I have this query below and hibernate's EntityManager is throwing an exception ...
4
votes
1answer
24 views

Compute the azimuth between two UTM32N points using Java GeoTools

I am using Java GeoTools to compute the azimuth between two UTM32N points, e.g. between POINT(496383,5419109) and POINT(528196,6070949). Is it possible to do so without converting the points to WGS84 ...
-3
votes
1answer
42 views

Adding ortho images in Java project ArcGIS (SDK ArcGIS)

I would like to use my orthophoto in my project. I'm using ArcGIS SDK Java and the component: ArcGISMap map = new ArcGISMap(Basemap.createStreetsVector()); My orthophoto size is 4 GB (.7z)
3
votes
2answers
33 views

Geotools Point in Polygon incorrect result vs QGIS

I need to find the point in a polygon to get the corresponding feature and the result does not match the display in QGIS. QGIS shows the information correctly but with geotools I can't get it right. ...
2
votes
1answer
241 views

Read GML using Java

I have a use case on reading and extracting data from GML (Geography Markup Language) using Java. There is a sample file in GitHub by clicking here. The imported packages in Java were as follows ...
1
vote
1answer
51 views

Point placement between midpoint and endpoint

I have a line with a, Mid Point End Point I'm trying to return a coordinate that's LENGTH away from Mid point (on the same line) and between end and mid (oppose to between Midpoint and the ...
0
votes
1answer
64 views

Unable to deserialize entity which contains field with type org.postgresql.geometric.PGpath

I have an Entity which has a field named coordinates of type org.postgresql.geometric.PGpath : public class Geometry { ... @Column @NotNull private PGpath coordinates; I am trying to ...
1
vote
1answer
35 views

Apply Point style in JMapFrame GUI

I've managed to create a Point shapefile creating a SimpleFeature and outputting it as Test_Point.shp, public static final SimpleFeatureType POINT = createPointType(); private static SimpleFeature ...
0
votes
1answer
33 views

Convert Point to Arrow (SymbolizedPoint)

So I managed to get a point to show up at the center of my line, I'm hoping to convert the point into an arrow pointing in the direction of my line public static final SimpleFeatureType POINT = ...
0
votes
0answers
16 views

What is wrong with this Path in Carto Map SDK?

I am using Carto Mobile SDK to develop an Android-based Navigation Application (using Java). I have been following the documentation step by step. Right now I am adding a 3D Vector Object on the map. ...
4
votes
1answer
56 views

Calculate difference of two LineString

The tool I'm developing is written in Java with Spring Boot, using PostgreSQL as database (PostGIS extension). I also make use of GeoTools. I want to calculate the geometrical difference between two ...
1
vote
1answer
29 views

Creating a useable Geometry for GeoTools

Just getting into using the GeoTools framework, after having done a lot of things manually. One of my previously-written functions transforms a given lat/lon/height between CRS. I found this link: ...
0
votes
0answers
57 views

Is there a relation between EPSG 4326 coordinates and meters?

I have information about different locations in a Java List. Each location has it's coordinates (longitude and latitude) For example: longitude = 2.37364 latitude = 42.38473 I need to look up using ...
1
vote
0answers
33 views

Get elevation of GeoTIFF using GDAL bindings in Java

I'd like to read an elevation value from a GeoTIFF that I have. It's already working, but I'd like to interpolate the values for better results. I currently do so like this: Dataset dataset = gdal....
1
vote
1answer
145 views

Creating a shapefile with SQL Query Using Geotools Hibernate and Java

Here is my context : 1] I have geometries in an postgresql database 2] My application uses JAVA/Hibernate 3] I Currently use Geotools to create a shapefile How I do it ? First i retrieve my ...
1
vote
1answer
71 views

Extracting GDAL Metadata field but using Geotools in Java with TIFF files

I am trying to extract Metadata field from a TIFF file using GeoTools in Java, since I can't use GDAL to achieve that on the deployment platform. I downloaded a TIFF sample file and used gdalinfo ...
2
votes
1answer
81 views

How to set image for Picture / IPicture for ArcGIS Desktop?

I am struggling with ESRI's Picture / IPicture Java documentation for ArcObjects 10.4. I just need to grab the image file from my project's source (src) folder, and cast that as a Picture. Here's ...
1
vote
1answer
69 views

Make IPictureMarkerSymbol file path accessible to all users?

I've written a little java add-in button for ArcDesktop 10.4, in eclipse, which makes a new ArcMap layer with some points. (NOT Runtime) My goal is to assign a picture as the symbol for each of these ...
0
votes
1answer
130 views

Can't change store dir or create new raster store on GeoServer 2.16. Failed to create reader from file: data/

I tryied to change raster source for existing raster store, but face it: Could not list layers for this store, an error occurred retrieving them: Failed to create reader from file:data/...
1
vote
1answer
168 views

Convert image from GeoJSON

I am trying to convert feature collection GeoJSON into image. I want to use geotools to convert. I tested the soultion from this post here. But I am really noob that I ran into some errors like this: ...
0
votes
1answer
553 views

Add legend in a SplitPanel in Google-Earth Engine

I have made a code with a Split Panel (1) , now i what to add a legend like this example: https://code.earthengine.google.com/b5d35a19689ec5698e59f36a9b3ae6f8 this is my original code that I want to ...
3
votes
1answer
29 views

GeoTools: java.util.{List, Map} in SimpleFeature

I'd like to add a List(Map) as Attribute to a SimpleFeature when using the PostGIS datastore: SimpleFeatureTypeBuilder simpleFeatureTypeBuilder = new SimpleFeatureTypeBuilder(); ...
3
votes
1answer
39 views

Adding attribute to a feature type?

I need to do something apparently simple: adding a new attribute to an existing simple feature type. Something like: SimpleFeatureType sft = DataUtilities.createType("", "the_geom:Point:srid=3035,ex:...
1
vote
1answer
129 views

Reading through shapefile table with Geotools

Goal: Read through a shapefile table with Geotools. I'm confused about FeatureSource, FeatureCollection, and FeatureIterator in Geotools. In ArcGIS, I can open a table in an existing shapefile, and ...
-1
votes
1answer
149 views

Geonetwork startup. Raised exception while starting the application

I'm encountering a problem that prevents the proper startup of Geonetwork Opensource. It always worked up to now but honestly, I don't remember any system change that might have caused that. Linux ...
0
votes
0answers
25 views

GDAL installation required for users?

I'm writing a little Java program to read some shapefiles & spit out the result of some calculations. I'm using GDAL, as the arcObjects.jar for ArcGIS Desktop is too restrictive for what I need (...
0
votes
2answers
53 views

GeoServer 2.16: Null object returned for expression: legend.width for setting value: 0 on: StyleInfoImpl[test_osm:rf] [closed]

I don't really understund how and why, but when I tried to save CSS changes on Style page of GeoServer GUI (by Apply or Submit) I saw it: java.lang.IllegalStateException: Cannot access /opt/tomcat/...
0
votes
0answers
49 views

GDAL - Class File Editor: Source not found, The source attachment does not contain the source for the file osrJNI.class

Trying short java code example through gdal in eclipse, which fails. link: https://trac.osgeo.org/gdal/browser/trunk/gdal/swig/java/apps/OSRTest.java code: import org.gdal.osr.SpatialReference; ...
0
votes
0answers
25 views

ArcCatalog doesn't run program

I've designed a program in which: user selects their input directory, the source of the shapefiles user selects their output folder, where their file will end up user names their resulting Excel ...
1
vote
0answers
15 views

ArcObjects and JavaFX [closed]

I am trying to export my ESRI add-in to ArcCatalog. I have access to ArcGIS for Desktop. I do not use Arc Runtime. I have created a java small program, and I'd like to kick it off with a button. ...

1
2 3 4 5
16