GeoTools is an open source Java library that provides tools for geospatial data.

learn more… | top users | synonyms

3
votes
1answer
32 views

How do I produce a GeoJSON with 1 point at a certain lon/lat?

I need to create a GeoJSON string, which contains exactly one point at lon/lat 132.159633, 43.350116. I'm trying to use GeoTools 12-RC1 for that. Let's say I have following method, which is supposed ...
2
votes
2answers
69 views

Can I use “Web Map Service Module” and “Web Feature Service Module” of Geoserver in my project?

I'm developing a GIS application with java Srping Framework and GeoTools library. I have some vector layer. I want to get this layers with wms and wfs protocols. I've downloaded geoserver code. It ...
0
votes
2answers
74 views

Using Geotools: How to convert these strange coordinates from a shapefile into regular lat and long?

I use this dataset from the European Union: http://www.eea.europa.eu/data-and-maps/data/administrative-land-accounting-units Opening the shapefile with Java' Geotools, I see coordinates like: ...
0
votes
1answer
39 views

Equidistant Cartesian projection for NYC

I'm working on a project in which I cluster locations in New York City based on their distance. My dataset contains latitude and longitude and thus I'd like to project it to a 2D Cartesian space in ...
2
votes
1answer
51 views

How to create a new shape file from jts geometries?

What I use: Java 1.7, JTS 1.13, geotools.api 14 What I have finished: Creating correct JTS geometries from OSM relations, ways and nodes. What I want to achieve: Create a csv file which contains the ...
0
votes
0answers
29 views

GeoTools WFS Authentication

I have a connection with basicAuthentication, the getCapabilities and getFeatureStore return me correct data but when i try to commit a transaction I get the next exception: "HTTP response code:401 ...
0
votes
0answers
17 views

GeoTiff error when building Jar with GeoTools

I'm seeking some help with GeoTools. I've been using it for a school's project, I had almost no problem until now. But now that my project is done, I've tried to build an executable jar with the ...
1
vote
1answer
38 views

How save modified features in server side with java and geotools?

I'm developing a gis Application with java. I use Spring 4.0.1 and GeoTools-13-RC1 in server side and OpenLayers 2.13.1 in client side. In client side, I have a wfs layer and it is as follow: var ...
0
votes
0answers
93 views

Problems with direct connection to ESRI Oracle db for 9.3.1?

I am trying to create a direct connection to ESRI Oracle database for version 9.3.1. When I try to connect I get this error: org.geotools.arcsde.ArcSdeException: Can't create connection to none for ...
1
vote
1answer
27 views

Geotools geoTiff running slow

I am using following code to display geotiff file. Its only a small file 1,5MB but when I am moving map I have online white screen which gets loaded after I finish moving but it is a bit slow for me. ...
0
votes
0answers
20 views

How can I modify the records of geotable and non-geotable in app application with hibernate-spatial and geoTools

I want to develop a GIS application with JAVA. I want to use Spring-4.0.1, and Hibernate-4.3.x. The application’s Database have GeoTable and Non-GeoTable. The records of all tables are modified. I can ...
1
vote
1answer
17 views

Geotools loading MBTiles

is there a way to load MBTiles file using GeoTools? I need to work with huge map an so far I have tried PNG + world file which was unusable (slow speed due to large files - 150MB). So I am thinking ...
0
votes
1answer
132 views

Direct connection from geotools to arcgis 10.3

Is it possible to direcly connect to ESRI 10.3 database using geotools ? I use geotools 13.0 and have ESRI database set up on oracle. Previously I was able to connect to SDE using gt-arcsde-plugin ...
1
vote
0answers
88 views

How to get geoJSON from spring REST Controller?

I am developing a GIS application with java(Spring-4.1.5 + Hibernate-4.3.8) and OpenLayers. For this project I use GeoTools-13RC, HibernateSptial-4.3, jts-1.13 and jackson-2.5. In this project, I have ...
1
vote
0answers
20 views

How get geoJson layer whit geoTools? [duplicate]

I have a class in java: "MyPoint" Class: @Entity @Table(name="MyPoint") public class MyPoint{ @id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long Id; @Column ...
4
votes
2answers
259 views

Are mixed geometry types allowed in a shapefile?

Does the shapefile support mixed geometry types (ie. point and polygon all in the same file)?
1
vote
1answer
49 views

Unable to read different kind of shape files

I have written the java code to read the shapefile and insert it into the table. But the way I have written code it will accept only a multistring .shp file. It fails for other shapefile geometry ...
1
vote
0answers
18 views

Geoserver - How to make a psql-backed timestamp that uses timezones

I'm working on an application that extends geoserver and am frustrated as I'm trying to define a SimpleFeature that has timestamps that include timezones. I've tried declaring my timestamp field ...
1
vote
0answers
72 views

Is geotools transformation of EPSG:3785 (Web mercator) to EPSG:4326 wrong?

Using postgres (9.3.6) and postgis: select st_astext(st_transform(ST_GeomFromEWKT('SRID=3785;POINT( 7550310.77 4139679.02 )'), 4326)); This returns POINT(67.8255956454323 34.8217133646348) Using ...
0
votes
1answer
20 views

Problem with editing in geotools 13.0

I have a problem with getting the ID of a newly created feature in the shapefile. I have a datasource / datastore that reads and writes to a shapefile. I create a feature, add it to the store and ...
0
votes
0answers
68 views

ClassNotFound Exception: org.postgresql.Driver Using Geotool: gt-imagemosiac-jdbc-x.x.jar

I am a newbie to GIS, coming from a strict MIS background. Anyway, I have been having a little challenge for the past couple of days trying to import tiles and pyramids into my database. Using a ...
0
votes
0answers
55 views

GeoTools refresh layers in map

I need update/refresh/repaint the layer on the map when i click on the button refresh. I remove the layer and add it again but it not working and points on the map are not displaying. Is there an ...
0
votes
1answer
51 views

unable to catch exception in opening a shape file geotoools

I am loading a shapefile where .shx file is missing i am getting the following error. I am unable to catch this exception please help me. error log Could not open the .shx file, continuing ...
1
vote
1answer
95 views

Different definition of EPSG:3857 in GeoTools and QGIS

I want to do some checking if my point lies in any of the polygons defined in shapefile. So, I thought that I will determine CRS from shapefile (created in QGIS), and use it for transformation (where ...
0
votes
0answers
41 views

JTS Geometry to GML3.1 encoding

I searched all the internet and I didn't find a solution to my problem. I want to convert a JTS geometry to a GML3.1 geometry. Geo tools says that have support but the have not (please check encode ...
0
votes
1answer
71 views

GeoServer/GeoTools (backed by Neo4J) or implement it myself?

I’ve been trying to get my head around the best way to build support for some planning processes we need to invent to support an infrastructure build project. Today I’ve got my hands on a load of GB ...
1
vote
0answers
27 views

How to load ALKIS (GML3) data in GeoTools

I wonder how I can load ALKIS GML (German gov geo data) in GeoTools. Here is a small sample dataset from the government: ...
1
vote
0answers
17 views

Disabling XML schema when using GML3 decodeFeatureCollection in GeoTools

I wrote some code based on http://docs.geotools.org/stable/userguide/library/xml/geometry.html#id6 GML gml = new GML(Version.GML3); try { InputStream in = new FileInputStream("file.gml"); ...
-1
votes
1answer
65 views

Not able to read Multilinestring and multigeometry with geotool from KML file

We are not able to read Multilinestring tag field from geotools. We are able to read multigeometry but its coordinate we are getting empty. any suggestion or code snippet would really help me. I ...
1
vote
1answer
39 views

How to crop a shapefile using a raster with Geotools?

I'm working on a project for my school for which I need to use Geotools. I need to be able to display a raster file and a shapefile, but the shapefile is way bigger than the raster and I just want to ...
0
votes
1answer
53 views

GeoTools WFS Query sortBy not working for GeoServer WFS

I am using GeoTools to query a GeoServer WFS using the following code: Map connectionParameters = new HashMap(); connectionParameters.put("WFSDataStoreFactory:GET_CAPABILITIES_URL", ...
0
votes
1answer
34 views

Can I put a JMapFrame In my main JFrame?

I use Geotools, I have a main Jframe and i want to put in it a map content(JMapFrame). Is there a way to add JMapFrame in JFrame?
0
votes
0answers
21 views

How to obtain a `GridCoverage2D` from Geoserver raster layer?

I am learning java programming with geoserver. I see that in geoserver web services if you pick a raster layer as an input parameter (e.g. img1) from the web service builder interface, in the java ...
0
votes
0answers
48 views

How to combine two `GridCoverage2D` to make a new `GridCoverage2D`

I was wondering if there is any GeoTools code example which combines two GridCoverage2D to make a third new GridCoverage2D? I can find examples for reading pixels from GridCoverage2D or writing a ...
3
votes
2answers
230 views

how to find necessary geoserver/geotools maven dependencies for a class?

I am trying to create a Web Processing Service with GeoServer. I used maven following opengeo instructions, and I get an eclipse project with a pom.xml file with dependencies like the following: ...
0
votes
1answer
54 views

Check Geometry Type of a Shapefile Using GeoTools?

I want to get the type (point, line, or polygon) of shapefile using GeoTools but so far I haven't found any code. Any other Java library also works for me.
2
votes
0answers
222 views

GeoTools - Find distance in meters between point and path in lat/lon

I need to find distance in meters between some point with given latitude and longitude and line (on Earth) defined by several points with lat/lon coordinates. I read this questions: first second ...
1
vote
0answers
28 views

combine multiple geojsons

I have several geojsons which contain polygons. But the polygons are reaching over other geojsons. When I import them into lets say Qgis, the polygons, which are distributed among several geojsons are ...
1
vote
1answer
42 views

How to add a new features to an existing shapefile using Geotools?

I have a shapefile with some points. I would like to add a new points to this shapefile using Geotools.
0
votes
0answers
54 views

Geotools/Geoserver Modifiy interpolate function with dynamic color fill

Here I am again with a different approach to my problem. I use the interpolate function in geoserver to get a choropleth from my data. The problem is that I have to hardcode the color for each value ...
0
votes
0answers
131 views

FATAL: **password authentication failed for user “Geotools”**

I just add Geotools jar files and used projection packages import org.geotools.geometry.jts.JTS; import org.geotools.referencing.CRS; CoordinateReferenceSystem sourceCRS = CRS.decode("EPSG:4326"); ...
2
votes
1answer
197 views

geotools Linestring distance in meters

I want to use geotools for working with gis data. I'm most concerned about distance calculations, not so much about drawing a map. What I still couldn't figure out is how to make distance calculations ...
1
vote
1answer
133 views

Error Reading ESRI ArcGrid File using GeoTools?

I have a raster file in ESRI ArcGrid format (e.g. hdr.adf). I would like to run some analysis using GeoTools. I've never used the coverage classes before and I'm having a few problems out of the ...
0
votes
0answers
29 views

import org.geotools.referencing.CRS

while working on java serve-lets, I wanted to project a pointset from EPSG:4326 to Mercator projection. But I'm lost on how to get and use the package "import org.geotools.referencing.CRS". My ...
0
votes
0answers
106 views

how apply an SLD to vector layer in geoTools java

I have been using geoTools 11.2 in Java 1.8 to display a vector layer with a desired style of it in worldwind 2.0. I have read features and styles and created objects. I have my own defined vector ...
0
votes
0answers
81 views

Unit of Geotools' getArea function

I have Polygons with WGS84/EPSG:4326 coordinates (like 13.57933804767844,52.5126298984133) and use the Polygon.getArea function to obtain the area of the polygon. But the result I get is something ...
1
vote
1answer
24 views

Trouble in Natural Earth Shapefile “jumps” read using GeoTools

I'm using GeoTools 12.0 to read in Natural Earth data. I'm really happy with the performance, and ease of implementation. But, I'm having trouble reading in very large polygon data. The 110M Ocean ...
1
vote
1answer
105 views

How to split a geotiff into a standard tiling scheme with Geotools in Java

I would like to tile random geotiffs to a standard grid, with a standard size of 256X256 using Geotools in java. My use case is as follows: I receive a "stream" of raster data in the form of multiband ...
1
vote
0answers
73 views

Geotools WFS basic authentication

I'm trying to retrieve data from remote WFS server which requires basic https authentication using GeoTools. I defined connection parameters for username and password like ...
0
votes
0answers
71 views

Linear interpolation on raster data, save result (geoserver)

I am trying to perform a linear interpolation on a coverage layer (Source data is in EHdr Coverage format, file extension: .flt). Ultimately, I want to use the interpolated layer as input to a WPS ...