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

learn more… | top users | synonyms

0
votes
0answers
7 views

Addressing a WPS using Geotools' ExecuteProcessRequest

I am trying to address a WPS that is running on a known machine to retrieve some isochrones. Below are excerpts from the relevant parts of the WSDL of said server: <schema ...
0
votes
0answers
10 views

Label rendered with empty features using geotools

I am using geotools to generate some images based on the shapefile data, it works well until I tried to add labels for the line features: the labels are rendred even there is no features in the ...
0
votes
2answers
28 views

How to define a coordinate reference system with rotation in GeoServer?

I am using GeoServer and have a layer in EPSG:900913 ("Google Mercator"). I need to "rotate" the map around certain point (say, 1500000, 7000000) by certain degree (say, 30 degrees clockwise). How ...
1
vote
1answer
19 views

How to pass custom data in GeoJSON point?

I have an application, which creates a GeoJSON stream on the server, which is then rendered on the client (using CesiumJS). GeoJSON is created using GeoTools. I want to pass some custom data to the ...
0
votes
0answers
19 views

GeoServer: Filter Function problem for function if_then_else argument #2 - expected type Object

I'm facing a problem with the GeoServer SLD XML. My XML code is as follows: <Fill> <CssParameter name="fill"> <ogc:Function name="if_then_else"> ...
1
vote
0answers
16 views

GeoTools How to add attribute to a schema in DataStore

As you know, you can create a schema in a DataStore. For example, you may create a table in a postgresql database like this: SimpleFeatureType schema = ...;// some schema DataStore dataStore = ...
0
votes
1answer
33 views

Java library to compare shape files

I have county shape file & school district shape file. Once each school district file is overlay on county shape file I would like to know how much % of area of school district file covered by ...
9
votes
2answers
201 views

Why do I get correct area and intersect area when use wrong projection?

I need to calculate areas and intersection areas for polygons (some real geographical objects like lake, city, country, e.t.c.). Polygons located in California, New Zealand, Russia.Anadyr, Sweden All ...
3
votes
1answer
25 views

Add Features from KML to a GeoPackage using GeoTools

Using GeoTools v13.2 I need to add features to a GeoPackage from KML. So far I can get the features in a SimpleFeatureCollection which can be added to the GeoPackage: public void ...
1
vote
1answer
15 views

GeoTools Geometries lost when storing features to shapefile [duplicate]

As you know, the geometry column name of schema for saving into a shapefile must be "the_geom". I have a SimpleFeatureCollection with a schema, geometry name of which is not "the_geom"; It is ...
0
votes
0answers
43 views

How to choose a projection for area measurement on building to continental scales?

I have many geographical objects described as polylines, polygons, multipolygons. All objects are in WGS84. Object could be: a building, stadium, park, street, highway, city, state, even country and ...
0
votes
0answers
24 views

Wrong axis order in geotools crs when reading from EPSG:4326 [duplicate]

Map<String,Object> params = ...; // postgis params DataStore dataStore = DataStoreFinder.getDataStore(params); SimpleFeatureCollection collection=...;// collection to save SimpleFeatureType ...
3
votes
2answers
139 views

Difference between CoordinateSystem and CoordinateReferenceSystem

What is the concept of Coordinate Refenrece System. You know GeoTools has a FeatureType class having getCoordinateReferenceSystem() function and also a CoordinateReferenceSystem class having ...
0
votes
1answer
24 views

GeoTools modify a FeatureType to change its name

I have a featureCollection and I want to save it into PostGIS dataStore. So I'm going to create a database table by geotools. I want to name my table "ali". But I can't rename the schema! DataStore ...
1
vote
1answer
30 views

Null save into Shapefile using geotools

When I convert csv to shp in geotools, I have an error NULL store for first attribute in my shape file. e.g. - want result: POINT(3625.55 3659.25), 2.4, 3.9 Error result: Null, 2.4, 3.9 This is ...
1
vote
0answers
24 views

In Geotools, why does reprojecting the origin of a GridGeometry2D results in off-the-grid coordinates?

I have a simple GridGeometry2D in Geotools 13.1 that is created like this: GridEnvelope grid = new GridEnvelope2D(0, 0, 100, 100); Envelope2D envelope = new Envelope2D(CRS.decode("EPSG:3857"), 10.0, ...
1
vote
2answers
71 views

How to programmatically import a Shapefile into Oracle DB using Java?

What's the best approach to import a user uploaded shapefile into an Oracle DB? The dbf, shx and shp files of the Shapefile come in a ZIP Archive. Currently, we unzip programatically and then parse ...
1
vote
2answers
40 views

GeoTools CRS.getAxisOrder(CRS.getAxisOrder(“EPSG:4326”)) returns EAST_NORTH (LON_LAT)

All is in the title, with GeoTools if I do : AxisOrder order = CRS.getAxisOrder(CRS.getAxisOrder("EPSG:4326")); It returns EAST_NORTH (= LON_LAT), but EPSG:4326 is defined as ordering latitude ...
0
votes
1answer
54 views

GeoTools, convert CRS for Google Maps

I'm trying to use GeoTools to convert coordinates from EPSG:3857 to various CRS, in order to display WMS layers on a Google Map. For example, I want to display a layer in the EPSG:4326 CRS. I have ...
0
votes
1answer
56 views

GeoTools decode FeatureType

Encode: 1- A way of encoding a FeatureType is : SimpleFeatureType TYPE = DataUtilities.createType("Location", "geom:Point,name:String"); GML encode = new GML(Version.GML2); encode.setBaseURL(new ...
0
votes
0answers
19 views

Insensitive case query in Geotools to WFS

I'm trying to make an insensitive case query from Geotools to WFS (Web feature service) datasource,I used FilterFactory2 with the method like(Expression expr, String pattern, String wildcard, String ...
3
votes
1answer
47 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
81 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 ...
1
vote
2answers
103 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
51 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
93 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 ...
1
vote
0answers
39 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
29 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 ...
2
votes
1answer
68 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
159 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
34 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
26 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
26 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
189 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
137 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
21 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 ...
5
votes
2answers
282 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
54 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
26 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
105 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
26 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
103 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
76 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
69 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
2answers
178 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 ...
1
vote
0answers
61 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
83 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
35 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
22 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
79 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 ...