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

Aggregations With Geomesa

Does geomesa support aggregation functions?. Like 1. Calculating matching feature COUNT for the given query. Max/Min of an attribute for specified query collections. Avg of an attribute value for specified query collections. I tried with geotools…
Suresh Prajapati
  • 3,991
  • 5
  • 26
  • 38
1
vote
1 answer

Building GeoTools Geometry "segments" from route coordinates

From a set of coordinates that define a route, I want to draw a Geometry that mimicks a theoretical highway of that track, given an arbitrary number of meters wide (e.g. 20) I don't know if GeoTools provides tools for constructing a Geometry with…
jonayreyes
  • 538
  • 1
  • 10
  • 27
1
vote
1 answer

save geotools query result in a shape file/csv file

I have implemented GeoTools Query tutorial. Can someone tell me that how could I apply a query in two shape files at a time and save the results in a new shape file or a csv file. or even can i save the query results of a single shape file as done…
Just Fun
  • 11
  • 2
1
vote
0 answers

Creating a Solid in Geotools

I'm currently evaluating Geotools' (version 17-SNAPSHOT) 3D capabilities and stumbled across its Solid interface (see here: http://docs.geotools.org/stable/javadocs/org/opengis/geometry/primitive/class-use/Solid.html). I found out that I can create…
Matthias R.
  • 441
  • 2
  • 15
1
vote
2 answers

Not able to load shapefile using GeoTools

I am trying to use GeoTools in order to load a shapefile into java and then check whether a point is located within one of the polygons in the shape file The problem is that i am not able to load the shapefile and therefore to continue forward. Here…
user4559332
1
vote
1 answer

Reset cursor of jmappane

There is the standard zoom tool on the left where you can click and the cursor on the mappane changes to the same icon as the tool. I have implemented two other zoom buttons which should reset the cursor icon to the default icon. Where can I find…
ave4496
  • 2,950
  • 3
  • 21
  • 48
1
vote
1 answer

REcover or reconstruct the CQL string from a geotools Filter object

I want to know if there is a way to get the CQL string that was used to create a Filter object can be recovered or reconstructed, such that it could be used to create the same filter again. i.e. Filter filter = ECQL.toFilter("name = 'bob'"); String…
Samuel Jones
  • 105
  • 10
1
vote
2 answers

Java Geotools: Snap to line identifiying line that was snapped to

I am trying to write a Java program that will snap a large series of GPS co-ordinates to a line shapefile (a road network) and return not just the new co-ordinates, but a unique identifier for the line segment snapped to. It doesn't matter if this…
GeoWork
  • 15
  • 5
1
vote
1 answer

How do you move an envelope to a specific point?

Point p = /*a point*/; ReferencedEnvelope envelope = mapPane.getDisplayArea(); /*envelope.moveTo or something like that? */ mapPane.setDisplayArea(envelope); How can I move the envelope so that the center position is the position of the given…
ave4496
  • 2,950
  • 3
  • 21
  • 48
1
vote
0 answers

Using GeoTools GeoTiffReader to read resolution other than the max

I have a geotiff file. I can read the highest resolution level just fine using: GeoTiffReader reader = new GeoTiffReader(file, new Hints(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE)); String[] gridCoverageNames =…
Brian McCormick
  • 449
  • 4
  • 5
1
vote
1 answer

How can you know the sequence/names of the bands of a GeoTIFF/TIFF file in Java?

I want to know the sequence of the bands (4 and more) of a GeoTIFF file for example whether the sequence is blue, green, red, near infra red, temperature, etc or green, blue, ... How can I know that in Java, for example in GeoTools library? And by…
Mosab Shaheen
  • 1,114
  • 10
  • 25
1
vote
0 answers

Is org.geotools.geometry.jts.GeometryBuilder thread safe?

Is the JTS variant of GeoTools' GeometryBuilder (org.geotools.geometry.jts.GeometryBuilder) thread safe? It's unclear from the documentation although the non-JTS GeometryBuilder does hint that it's not thread safe. The main advantage a "builder"…
Steve Kuo
  • 61,876
  • 75
  • 195
  • 257
1
vote
1 answer

Geotools minimum spanning tree

Is there an implementation of prim's algorithm or any other algorithm in geotools graph package for solving the minimum spanning tree problem?
1
vote
0 answers

Iterating through shapefile records in GeoTools using a filter

I have a pretty large shapefile with almost 14,000 polygons in it. It is about 350mb. I am trying to read it with a SimpleFeatureIterator but it doesn't seem to respect the start Index I specify. It does respect the max features so I think I am…
Brian McCormick
  • 449
  • 4
  • 5
1
vote
1 answer

Convert Longitude and Latitude to image X, Y pixel coordinates on Alber's projection

I get many coordinates from a radar, these coordinates formatted pretty much the same as Google maps coordinates, I am not really sure but I asked the company and they told me in order to get the coordinates on Alber's projection, I need to do the…
ben berizovsky
  • 759
  • 1
  • 6
  • 17