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

learn more… | top users | synonyms

2
votes
0answers
17 views

GeoServer: `org.geotools.process.raster.AffineProcess` could not be instantiated, how to fix?

I have installed GeoServer from OpenGeo Suite 4.1 on a fresh Unbuntu 12.04 following Boundless instructions. Now I wanted to test geoscript-groovy, and installed groovy, geoscript-groovy-1.3.1, ...
0
votes
0answers
21 views

Exporting a shapefile with geodetic values in geotools

I have collections of polygon features. Each point in a polygon has local cooridantes (x y values) and geodetic Coordinates (latitude and longitude in decimal degree) i can easily export the shape ...
3
votes
1answer
74 views

How to find intersected line is from left or right on another line?

There is a main LineString and its direction is known. I want to find the side of intersected lines to this main line. Example image: Black line is main LineString and red one is intersected ...
0
votes
1answer
17 views

Check if Point belongs to LineString in Geotools

Is there any way to check with Geotools if a point is placed on a LineString. I am trying to retrieve street names of a route obtained from a routing algorithm. The route is displayed in gps ...
0
votes
1answer
20 views

GeoTools exception: failed to connect to EPSG database

I downloaded the GeoTools 11.2 binary and am attempting to get it to run in my Netbeans java application. I tried to run this part of code: ... SimpleFeatureSource source = ...
0
votes
0answers
18 views

Create a point on a map using geotools

public class GeotoolsFxTest extends Application { Group root = new Group(); Group map1 = new Group(); Group map = new Group(); Group texts = new Group(); Scene scene; private double dragBaseX, ...
1
vote
1answer
25 views

How to get the LineStrings from a MultiLineString

I was wondering if there is a way I can extract the LineStrings from a MultiLinestring object. What I am really trying to do is look into a MultiLineString and see if I have a certain LineString. I ...
3
votes
1answer
100 views

Creating point in shapefile from latitude/longitude using GeoTools?

I m new to geotools and i find bit difficult to plot a point using the latitude and longitude values. can any one heple me out to solve my problem. GeometryFactory geometryFactory = ...
1
vote
0answers
19 views

Projecting all the points from the csv file at (0,0) in a map

I am trying to plot some points on a map using the geotools tutorial (http://docs.geotools.org/stable/tutorials/feature/csv2shp.html). Unexpectedly all the points given in the .csv file are being ...
1
vote
1answer
20 views

GeoTools and image storage / retrieval

Please can someone let me know how I can create a schema (using SimpleFeatureTypeBuilder()), read and write image data? Simple data types (Integer/Float etc) work fine but how do I handle image data?
2
votes
0answers
90 views

How to convert shp to csv

I am trying to convert my shape files to csv through a batch processing in Java using Geotools. The problem is I have more than 500 shape files (point features). The code is working fine for a small ...
3
votes
1answer
154 views

Coordinate conversion (EPSG:3857 to EPSG:4326) using OpenGIS/JTS too slow

I am using the Java based libraries of OpenGIS and JTS to convert coordinates from EPSG:3857 to EPSG:4326 to proceed to compute the distance using the Haversine formula. The distance features in a ...
0
votes
0answers
11 views

How to read *.map file by using geotools api in Java? [duplicate]

How to read *.map file by using geotools api? String filePath ="C:\\CTO-New\\SOCLOMO\\Location\\Map Info FIles\\New folder\\18-july-2014\\1301\\filename"; File file = new File(filePath); ...
1
vote
2answers
109 views

How to convert multiple csv files to shp using Java

I have some 100 CSV files. I want to convert them in shp format using Java. The csv file contains lat long information in WGS84. I can understand it is a batch processing and it is difficult to do in ...
1
vote
1answer
29 views

Java how to create geotiff from points

I have an array of objects where each object has three fields: lat, lon, and category. It is essentially pixels that have been given a land use category. I cannot figure out how to turn this data into ...
2
votes
0answers
30 views

Ortholines in GeoTools

I am using GeoTools 10.7 to generate a map with decorations in my Java application. One of the feature I need in the map is to display ortholines both latitude and longitude. The lines will need to be ...
1
vote
1answer
36 views

Importing a Shapefile in SpaceStat with GeoTools [duplicate]

I've just discovered the GeoTools tutorial to generate a Shapefile from a CSV containing a list of cities. I've managed to make it work but when I try to create a new Geography in SpaceStat, importing ...
1
vote
1answer
61 views

Missing class org.geotools.util.Version

Full story below, but essentially I'm trying to use Geoserver and it needs the class org.geotools.util.Version, but it can't find it even though I can see it's in the appropriate jar file. Something ...
2
votes
1answer
87 views

Extracting data from Natural Earth using GeoTools java class?

I wrote a small java class to extract country boundaries from naturalearthdata.com data. My problem is that the coordinates do not match with OSM map, the whole polygon is shifted... e.g. according to ...
2
votes
0answers
126 views

How to read each pixel of each band of a multiband GeoTiff with GeoTools Java

I am new to working with Raster in GeoTools-very experienced in java. My goal is to read in a geotiff that has multiple bands, then create a HashMap for each pixel, where the key is simply the lat/lon ...
1
vote
1answer
58 views

How to display additional features

In my application I have a gis file to render an (java BufferedImage) image of countries with geotools which is sent directly to the browser. The colours of the countries (plus name and additional ...
0
votes
0answers
35 views

Is there a way to retrieve/query country data from a shapefile programmatically using map coordinates in GeoTools?

I am using Geotools to parse and draw a shapefile. Now; when I draw that map I receive coordinates with this bit of code for my Flight Line button. void selectFeatures(MapMouseEvent ev) { ...
0
votes
0answers
91 views

Splitting multiple polygons with a line in JTS geotools

i am using geotools as my GIS map solution. now i want to split multiple polygons to build a road or river. passing through multiple polygons so, can you plz help me how to do this splitting a single ...
1
vote
1answer
40 views

Test for polygon orientation

I'm want to merge multiple geometries with Geotools (starting off with one geometry) but the result is a polygon that has a clockwise orientation. This gives a invalid geometry. My code for the merge: ...
1
vote
1answer
93 views

Displaying coordinate references in GeoTools?

I'm using this library to finish my final project and I have to say I'm no familiar with the maps worlds. My question is if geotools has a method to show automatically the coordinates references in ...
0
votes
0answers
10 views

Display coordinate references in Geotools

I'm using this library to finish my final project and i have to say I'm no familiar with the maps worlds. My question is if geotools has a method to show automatically the coordinates references in ...
0
votes
0answers
60 views

Drawing Line on existant Shapefile in Geotools

I have a shapefile that is opened and looks as such: Now I am attempting to draw a line from two points I click on that map; however the code they give for the QuickStart.java example is ...
0
votes
1answer
765 views

I nead to find the nearest places based on latitude/longitude points

I have a java aplication backed by a mysql database which contains events with locations (latitude/longitude), the location data is saved as POINT data type. I nead to find the nearest events in some ...
0
votes
1answer
40 views

how can we convert vector data to raster data in geotools

In my project iam able to open and save shape file. I want to convert this vector data to image format as a tiffimage plese help me the procedure to do the same.
0
votes
0answers
47 views

Geotool SwtMapPane draws in view but not in TitleAreDialog

I've written a very basic rcp app to show points and lines in a view. When I tried to move this code to a wizard page, it gave the error below. When I use code that simply loads and displays a ...
0
votes
1answer
79 views

A simple geotool app example

I've been playing around with the GeoTools libraries, but I can only show shape files and no custom layers. Requirements are that it must use the SWTMapPane and not via the static ...
1
vote
1answer
109 views

Transactions in Geoserver / WFS - Is it possible to know which “action” failed?

I'm trying to implement transactions for some queries to Geoserver. I'm using plain HTTP Post to make the requests, from Java. One of those queries looks something like : <wfs:Transaction ...
0
votes
1answer
122 views

Opening shapefiles with geotools

Trying to make a simple class that will read shapefiles and eventually be able to pull out the coordinates/attributes for each feature (working with points here). But can't quite figure out geotools. ...
1
vote
1answer
33 views

Problem Inserting feature with Geotools WFS

With this tutorial http://docs.codehaus.org/display/GEOTOOLS/Data+Writing When I try to insert a feature try { DataStore geoToolsClient = getGeoToolsClient(); Transaction transaction = new ...
1
vote
1answer
64 views

Can I define a transformation between 2D and 3D in Geotools?

I'm using Geotools, and I need to convert coordinates between 2D and 3D coordinate reference systems. I recognize that there's no universally-correct way to do this: 2D -> 3D means "making up" a Z ...
4
votes
2answers
115 views

How do I construct (or select) an appropriate local Cartesian coordinate system, for an arbitrary small area?

I'm relatively inexperienced with coordinate reference systems, so please bear with me if I'm not putting this clearly. I have existing software which works with an abstract (un-referenced) 3D ...
3
votes
1answer
58 views

Creation of tiled grid in JAVA with geotols

I am trying to create a grid using GeoTools in JAVA, covering specyfic area with resolution 50 m (distance between two points). To do so I have two points: the most nortwestern (let's call it NW) and ...
1
vote
0answers
88 views

Converting geometry to geography using org.geotools.geometry.jts.JTS

I'm trying to convert com.vividsolutions.jts.geom.Geometry to geography, using the GeoTools package - org.geotools.geometry.jts.JTS. This is my code: public Geometry getGeography() { Geometry geo ...
2
votes
1answer
25 views

Where are descriptions of attributes in datafiles on naturalearthdata.com?

I have downloaded some datafiles from naturalearthdata.com site. For example, ne_50m_admin_0_countries feature source contains dozenz of attributes with names like scalerank, level, mapcolor7, ...
0
votes
0answers
85 views

Java GeoTools - Getting CRS from SRID

I might confuse between two things, but I need to do some calculation on my polygons (distance, area etc.). Using the WKBReader, I'm getting the geo: WKBReader wkbReader = new WKBReader(); byte[] a = ...
2
votes
1answer
58 views

Bad calculations with Colombian projection (EPSG:3116)

Solved, reading mail-archive I can understand that there is a conflict between: gt-epsg-wkt-9.2.jar gt-epsg-hsql-9.2.jar I tested removing each one, with 'hsql' I get the same wrong result, but ...
1
vote
0answers
154 views

how to publish the layer from Mongodb store in geoserver?

I am using geoserver 2.5 MongoDb 2.4 Windows 7 64bit I am imported json data file into MongoDb using the below query. mongoimport --db GeoMongodb --collection states --file E:/states.json ...
0
votes
0answers
26 views

Creating visualizations for geometry points with geotools

I am a beginner in everything that involves GIS coding and so on. After doing some research i chose Geotools as the tool to help me with my project. Basically i will need to create a new routing ...
0
votes
1answer
84 views

How to add RGBA color map to single band GeoTIFF using GeoTools 2.x?

I am developing a light weight GIS application, and am looking for the simplest way to add an RGBA color map to a single band GeoTIFF using GeoTools 2.x?
2
votes
2answers
293 views

Conversion of point grid to a raster with open source tools (Gdal, QGIS …)

I'm looking to do something which seem simple to me, but I haven't found a solution since 2 days I looked for. I've got a Postgis DB with lot of points (WGS84) spaced of 100 meters which cover a ...
0
votes
0answers
65 views

Calculating scale from tiles using their envelope

I have a few problems I need to solve, and it comes down the the below example. It may be my understanding or the way I am doing it. Can someone please explain why my logic does not work. I am ...
0
votes
0answers
40 views

autocomplete polygon function with geotools

i'm using geotools to develop some GIS features, i don't know how to implement the autocomplete polygon function using Java code. does any one tried to do it before?
1
vote
1answer
66 views

How to check for overlapping check with tolerance using JTS / GeoTools

I have several hundered polygons which may overlap but need to be considered 'not overlapping' when the overlapping is less than 1 meter. The overlapping check in JTS does not offer a tolerance ...
3
votes
1answer
439 views

converting/parsing geojson into com.vividsolutions.jts geometry

Does any has any experience with converting string geojson into com.vividsolutions.jts geometry object (point, polygon, etc). Maybe there is some java library I cannot find. Greets!
0
votes
1answer
64 views

How to divide streets layer into 2 mile segments. [duplicate]

I have a streets layer which I want to divide into 2 mile segments. I have searched and read enough for days but there is no information on how to do this. The split command allows you to select and ...