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
0
votes
1 answer

geotools filter CQLException: Encountered "t"

I am querying a simple feature type…
Suresh Prajapati
  • 3,991
  • 5
  • 26
  • 38
0
votes
1 answer

Geomesa Feature Count always returning zero

I am developing geomesa client to perform basic read write and delete operations. I have also created a function which will return matching feature count for specified query, however it always returns zero, i also tried DataStore stats for fetching…
Suresh Prajapati
  • 3,991
  • 5
  • 26
  • 38
0
votes
1 answer

Opening .shp file in Java

I am trying to open .shp file downloaded from http://www.naturalearthdata.com/downloads/10m-cultural-vectors/10m-admin-0-countries/ using geotools. My code looks like this: File file = new File("ne_10m_admin_0_countries.shp"); try{ …
0
votes
1 answer

How to modify existing feature schema in geomesa-accumulo

I have feature "f" under a catalog(table) "c" which holds my temporal and spatial data along with some attributes(like speed and name). I am using java for inserting records in this feature type and everything is working fine. My question is what if…
Suresh Prajapati
  • 3,991
  • 5
  • 26
  • 38
0
votes
0 answers

Java Graphics to create a style

Is there a way to create a style for symbolising a point from Java Graphics? I have a class that return Java graphics, but couldn't figure how to create style from it public Graphic crtaj(Graphics g) { Graphics2D g2 = (Graphics2D) g; Double…
Zoran Kokeza
  • 165
  • 12
0
votes
0 answers

GeoTiffReader and InputFileStream

I have written a piece of Java code that accesses a large Geotiff. My code utilizes the GeoTiffReader method. When I run the code locally I simply pass GeoTiffReader the file name, and everything works fine. However, I am ultimately trying to have…
0
votes
1 answer

How to find a point(x,y) inside a irregular polygon using Oracle10g Spatial function or any other API

I am very new in working with GIS or geometry data. I have geometry data (polygon) in oracle10g database. Is there any Spatial function to find a point inside that polygon. If not then any tool like geotools for .Net or any other API can help me.…
Naym
  • 1
0
votes
3 answers

Input ESRI shapefile to java

I am new to geotools and my java knowledge is rusty. I'm trying to input many shapefile into java so that I can calculate the areas of all polygons in them and add a separate attribute to the respective shapefile. I tried using the code given in the…
0
votes
0 answers

VividSolutions shapefilereader acts differently in Windows and Linux

The Shapefilereader from Vivisolutions works perfectly in Windows, but in multiple ubuntu instances I get this error: java.lang.StringIndexOutOfBoundsException: String index out of range: 438 at…
user2887053
  • 103
  • 1
  • 2
  • 8
0
votes
1 answer

Issue with adding a Mapinfo-File using OgrJNI Plugin geotools

I am stuck into this from very long please help me in this. Please let me know how we can add a Mapinfo file Layer on geotools map please help in this OGRDataStoreFactory factory = new JniOGRDataStoreFactory(); Map
0
votes
2 answers

The method add(SimpleFeature) is undefined for the type SimpaleFeatureCollection

I am trying to implement one program for vectorization where I have following compile time error. I am using GeoTools 14.4. private SimpleFeatureCollection assembleFeatures(GridCoverage2D grid, int band, boolean insideEdges,…
prem30488
  • 2,828
  • 2
  • 25
  • 57
0
votes
1 answer

java.lang.ClassNotFoundException: it.geosolutions.jaiext.range.Range

I recently started my first program with GeoTools in which i was also using JAI- Java Advanced Imaging. I found following error Exception in thread "main" java.lang.NoClassDefFoundError: it/geosolutions/jaiext/range/Range at…
prem30488
  • 2,828
  • 2
  • 25
  • 57
0
votes
1 answer

Java Servlet : parsing geo JSON with Geotools

I'm working on a Web Map Service written in Java and using the GeoTools library. My goal is to make the data parsing json format, so I'm using the form Unsupported GeoTools. This is the parsingJSON method that takes in the path of the input file and…
maxada
  • 1
  • 2
0
votes
1 answer

Using Saxon with GeoTools

I am trying to get a project working using GeoTools with a dependency that uses Saxonica. So far, no luck Project pom.xml dependencies: org.auscope.portal portal-core
Michael
  • 47
  • 5
0
votes
0 answers

Java create image stack

I want to write a tiff image in Java which has 7 bands. My workflow looks as follows: I load a geotiff file, than, I select some 5pixel x 5pixel windows in the image and want to save them as a normal tiff image; the spatial information of the…
Mr M
  • 69
  • 8