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

learn more… | top users | synonyms

0
votes
0answers
10 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 What ...
1
vote
0answers
14 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
votes
0answers
34 views

How to generate map using geoserver & openlayers in java from postgis data? [closed]

I am a newbie in geoserver and want to know how to render map (postgis database) in openlayers using geoserver? I want to add the base layer. I tried: var layer = new OpenLayers.Layer.WMS("OpenLayers ...
1
vote
2answers
46 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
1answer
14 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
39 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 ...
-1
votes
1answer
43 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 ...
-3
votes
0answers
37 views

How to export shapefile as KML file using GeoTools?

I have a shapefile i need to export the shapefile as a *.kml file to fit in Google Maps how can i do with GeoTools. Please help me with at least one simple example or procedure to do that? ...
0
votes
0answers
15 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
43 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
79 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
92 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
47 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
65 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
32 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
26 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
52 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
130 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
33 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
23 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
24 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
155 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
114 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 ...
5
votes
2answers
267 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
25 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
87 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
23 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
88 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
64 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
63 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
125 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
47 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
75 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
30 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
18 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
76 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
45 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
60 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
44 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
22 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
54 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
295 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
64 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
279 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
30 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
47 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
62 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
151 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"); ...