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

This is a point in a polygon. Latitude and Longitude Coordinates. GeoTools

Given a polygon that I trace with Coordinates of Latitude and Longitude, given an fline that I also receive in (in Latitude, Longitude). I need to know if this point is inside my polygon or not import…
Jose
  • 1,779
  • 4
  • 26
  • 50
1
vote
1 answer

Can I implement Serializable which exists and compiled class in java(geotools)?

I wrote program for reading and displaying GIS shape files by GeoTools, and I want to save the state of my program. Main class.java Project myproject=new Project(); …
1
vote
0 answers

How to get Geoserver to use the MongoDB-Geo-Index for Heatmap Transformations?

We are currently trying to switch the backend for our Geoserver from Postgis to MongoDB. Apart from our Geoserver-Heatmap Transformations it is working quite well. While visualizing the Heatmap Geoserver seems to ignore the BBox constrains, this…
HannesHil
  • 11
  • 1
1
vote
3 answers

it is need to calculate the coordinate of the intersection point that is between the road and the designated distance from the starting point

Knowning the coordinate of the starting point on a road ,it is need to calculate the coordinate of the intersection point that is between the road and the designated distance from the starting point。This kind of question just like the…
yang jun
  • 143
  • 1
  • 5
1
vote
1 answer

java GeoTools : Sort a FeatureIterator by feature's area

I need to iterate through an already sorted SimpleFeatureCollection by theirs geometrie's area. I figured out that the classic SimpleFeatureIterator comes unsorted and a SortedFeatureIterator( SimpleFeatureIterator iterator, SimpleFeatureType…
1
vote
1 answer

Calculate large distance between two points using GeoTools

New to GeoTools and GIS and I am trying to calculate distance between Mumbai and Durban using GeoTools library. I am getting close to accurate results for small distances but when i go for bigger ones,the calculation is way too offcourse by 2000 km,…
1
vote
1 answer

Class conflict on different dependencies

I have the same class on 2 dependencies on my project. The libraries unit-api-1.0 (which is a dependency of org.geotools) and jscience-4.3.1 both have the class javax.measure.quantity.Length. [INFO] +- org.geotools:gt-shapefile:jar:22.3:compile …
Alexander Rumanovsk
  • 2,043
  • 4
  • 21
  • 33
1
vote
0 answers

How do you read a GeoJSON file that contains a single feature with the GeoTools gt-geojsondatastore plugin?

I have successfully processed files that contain a FeatureCollection using a GeoJSONDataStore, but when the file contains a single Feature, all I can manage is to get an empty FeatureCollection when I call getFeatures from the FeatureSource obtained…
James
  • 475
  • 4
  • 12
1
vote
1 answer

can't get contents in FeaturesCollection with geoTools

I am working with geoTools Library. My goal is to return features from geoServer. I am connected to dataStore correctly but i can't receive the content of collection features. When i try: SimpleFeatureCollection collection =…
1
vote
2 answers

Geotools with Glassfish: Failed to connect to the EPSG database

I have an application that uses Geotools. It works fine with tomcat, with glassfish however I get the following error. Here is a stacktrace: org.opengis.referencing.FactoryException: Failed to connect to the EPSG database. at…
Zhenya
  • 53
  • 2
  • 8
1
vote
1 answer

Reading ESRI shapefiles from the InputStream in Java

I have a web application that is supposed to read a shapefile from a user's disk. I use a MultipartFile class (https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/multipart/MultipartFile.html) to upload it. As far as I…
Ghostwriter
  • 2,461
  • 2
  • 16
  • 18
1
vote
2 answers

Legacy ArcGIS system on Windows 2012 with ArcSDE 10.2.2 won't connect

I'm currently working on a legacy system that's being rewritten by another contractor. Our mandate is to just keep the lights on until the rewrite is complete. So I understand all of what I'm listing is very old and out of date. We have a java…
fergp25
  • 41
  • 4
1
vote
2 answers

Trying to convert kml to geojson and getting ArrayIndexOutOfBoundsException with geotools

I am trying to convert a kml to geojson with geotools 20.5 and i am getting ArrayIndexOutOfBoundsException. The file i am trying to convert can be converted on other frameworks correctly but on geotools i had this error. I am using geotools 20.5…
1
vote
1 answer

Is possible to write a shape file with custom attributes definition using geotools?

I need to create a shape file with custom attribues. Particularly my problem is about Double that is write like Number,33,31 and I need Number,10,3. I'm using SimpleFeatureTypeBuilder for create the fields definitions an to method…
1
vote
1 answer

Need help rendering a JMapFrame froma cropped geotiff

I'm new to geotools and somewhat new to Java. I have created a program that can read a geotiff, crop it, and, using JavaFX, render the cropped image into an ImageView. Now, I'd like to add geographical points as layers on the rendered image. I've…
flyinggreg
  • 79
  • 1
  • 9