0
votes
0answers
27 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
31 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!
1
vote
1answer
28 views

How to create a value-by-alpha map in Java?

Someone has post similar question as mine before : similar question But my objective is slightly different. I have a shape file (.shp) (a country map) I would like to write a piece of java code to ...
2
votes
0answers
246 views

GeoTools WFS Feature retrieval

I am trying to use geotools to retrieve the list of features served by a WFS. I am following the tutorial provided at http://docs.geotools.org/latest/userguide/library/data/wfs.html. The code that I ...
2
votes
0answers
77 views

Create image (TIFF/PNG) from geodetic (lat/long) data

Using Java, I need to render a bunch of geodetic data to an image, ideally TIFF or PNG. Specifically this is weather data, with each sample having a latitude, longitude, and amplitude value. I'd like ...
2
votes
0answers
310 views

Building java based desktop map application using embedded database such as spatialite

I am relatively very new to building GIS based applications and have a very limited understanding in this area. So I need some help in building a java based desktop application which would generate ...
2
votes
1answer
99 views

geotools parsing kml with multigeometry only gives me first geometry

I'm trying to parse the states.kml file (http://docs.geotools.org/latest/userguide/_downloads/states.kml) on the geotools website using the following code: Parser parser = new Parser(new ...
1
vote
0answers
64 views

Csv To Shape Error

I have found a usefull tool to convert csv files into shape files with geotools: http : // docs.geotools.org/latest/userguide/tutorial/feature/csv2shp.html#create-a-shapefile-from-a-featurecollection ...
0
votes
1answer
80 views

Can I use GeoTools with Gradle?

I am going to implement shapefile uploading from a webform, and ingestion into PostGIS. One problem I am having is that my project is using Gradle for dependency management. I am unfamiliar with ...
0
votes
0answers
93 views

Create shape file with point

I am trying to create a .shp file with Point shapes. I am following this tutorial: http://docs.geotools.org/latest/userguide/tutorial/feature/csv2shp.html I create the project, no syntax error and ...
0
votes
1answer
126 views

getDestinationGeographicPoint() in geotools returns wrong coordinates in South/West

I am trying to calculate a coordinate given an azimuth, distance and start point. If my code uses an start coordinate in North/East quadrant, all goes fine. But, by using 0,0 coordinates, an azimuth ...
1
vote
1answer
362 views

combine several polygon objects in one polygon object with geotools (is it possible)?

I have several polygon objects and I need to "merge (or combine or dissolve)" them toghether into one polygon object. With a GIS tool like Quantum GIS, I do this with Geoprocessing option "Combine ...
10
votes
3answers
779 views

How to build a portfolio for a GIS/Java career path?

I have been a GIS Analyst for over 10 years and am currently studying java (50% through the course). My plan is to develop GIS applications mainly focused towards open source solutions. I would like ...
1
vote
1answer
293 views

Simple WebMapping application with postgis Database

am very new to web-mapping, so this question may be a little misguided. I want to develop a simple web mapping application using OpenLayers which can display Cadastral information that are currently ...
2
votes
1answer
118 views

How to modify the coordinates of a SHP geometry using Geotools?

I have a shapefile with some polygons. I would like to change the height for this elements using Java. The rest of the attributes should be the same. I've thought using GeoTools but I haven't found ...
2
votes
2answers
472 views

GeoJSON to Shape file conversion with geotools

Can someone please provide me an example of how to convert GeoJSON to Shape file using geotools?
3
votes
0answers
146 views

Illegal argument exception while reading tiff image using GeoTools

I am working on a Java swings based GIS application to project my tiff image as maps . But each time I run my application I get Illegal argument: "semiMajorAxis=�" . The tiff images I have are working ...
1
vote
0answers
389 views

Geotools, output to kml and convert meters

I have a complex problem. I'm using geotools 10.* I have input data: latitude, longitude (WGS_84), radius in meters, start angle (12 o'clock), end angle (clockwise, i.e. turn to the right). I need ...
1
vote
0answers
133 views

Renaming Columns in Geotools FeatureType

I am attempting to build a simple java program that loads shapefiles into a Postgis 2.0 database. Everything is working out great except that I would like to be able to modify the FeatureType in the ...
2
votes
1answer
106 views

Geotools 8.4 CRS.decode invalid(?) reference to HTTP_URI_OGC

I'm trying to do a simple CRS.decode to lookup a CoordinateReference system: E.g. CoordinateReferenceSystem target_crs = CRS.decode("EPSG:4326"); However this fails with a reference to the ...
4
votes
1answer
3k views

How to draw polygons on an existing map?

If you want a map with some circles, squares, etc. representing cities or something else you can use the following code. Note that you can change the map and the coordinates with yours, and you'll ...
2
votes
0answers
279 views

How to open image file saved with JAI in Geotools?

I need to find NDVI and other vegetation indices and then find changes in time with tif images. I've been using Geotools for this. I took 2 tiff images, then using QGIS I changed them to PNG because ...
3
votes
2answers
628 views

Merging Shapefiles With Geotools

I am trying to merge some shapefiles with different schemas in geotools. Im aware of ogr2ogr, but for now I would like to figure out this problem with Geotools. The steps I'm taking are: 1) Create a ...
2
votes
0answers
30 views

How to convert a shapefile to WKT with GeoTools snapshot 9? [duplicate]

Possible Duplicate: Write out a WKT file from a loaded shapefile I need to convert a shapefile to WKT to be read in OpenLayers. The shapefile is one that has been created by Geotools. ...
2
votes
1answer
255 views

What is the best API to use GeoTools or uDig (for the context of my application)?

I am trying to develop a java application that displays : Google maps, Openstreetmap and Bing Map Data. So which is the best SDK to use in this contet Geotools or uDig ?
2
votes
3answers
3k views

Displaying Google Maps and OpenStreetMap map in Java?

Is there any Java API that is like OpenLayers ? I would like to display google Maps and Openlayers Maps in a java application
3
votes
0answers
320 views

How to sort a SimpleFeatureCollection using GeoTools?

I have a featurecollection: SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(dbFeatureType); SimpleFeatureCollection collection = FeatureCollections.newCollection(); while ...
6
votes
1answer
720 views

Find Perpendicular Distance and Minimum Perpendicular Vector between a Point and a Line using GeoTools and JTS

I have a line formed by 2 lat/lon pairs, and the lat/lon of a point. I would like to find out the perpendicular distance between the line and the point on the Earth surface (can assume Earth as great ...
2
votes
0answers
218 views

Getting DataStore Problem with Geotools

I recently found an issue with Geotools and getting the datastore for a shapefile. If I try: FileDataStore dataStore = FileDataStoreFinder.getDataStore(file); -or- Map connect = new HashMap(); ...
2
votes
0answers
81 views

MultiPolygon from database

I would like to know how to create an instance of a Multipoint from a PostGIS database.. I do the query , then got the ResultSet named "area" , the column with MultiPolygon attributes is named "geom" ...
2
votes
1answer
129 views

Can I use a Geotools raster layer in a Geomajas webapplication?

I am working on a Geomajas web application and have a Geotools RasterLayer (a GridReaderLayer to be precise) that needs to be integrated with the map in the Geomajas app. I have been searching the ...
5
votes
1answer
353 views

What is the unit of measurement for buffer calculation?

What is the unit of measurement used by Geometry class for it's buffer calculation ? Api doc currently defines it as " distance - the width of the buffer (may be positive, negative or 0)" I need to ...
2
votes
2answers
5k views

convert wgs84 coordinate to Google Map coordinate system(EPSG 3785) with geotools and java

Could you please point me out where can I make such a transformation: convert wgs84(EPSG 4326) coordinate to Google Map coordinate system(EPSG 3785), and vise versa. Thank you.
4
votes
1answer
769 views

Write out a WKT file from a loaded shapefile

We are looking to load and display a shapefile, simple polygons, then write out a WKT string of that shapefile and have the user save it somewhere. Does anyone have some code snippets of that very ...
1
vote
0answers
370 views

Create a color scale/legend for choropleth map using geotools (or other open source Java library)?

I'm experimenting with choropleth maps using geotools. Is there an easy way to add a color scale to the map (using geotools itself or some other os library)? By a color scale I mean a bar that shows ...
1
vote
0answers
132 views

Get centroid of SimpleFeatures in GeoTools8

I've got some SimpleFeatureCollections and now I want to get the Centroid of every SimpleFeature in the collection. Unfortunally I've only found a centroid method for Geometry. Is there any way to ...
2
votes
2answers
672 views

How to add a background map to a java project?

I'm new at GIS. I am trying to make a java application that can display a map with certain points. I have achieved this using the geotools library. However, I want to put the map from OpenStreetMap or ...
0
votes
2answers
384 views

GeoTools 2.6.5: Cannot get JMapFrame to work because of problem with processStylers

I am trying to get JMapFrame to work to visualize some feature. Unfortunately I keep getting errors although this test app can be started. Toolbars etc. are shown. 18.02.2011 16:44:38 ...
5
votes
1answer
283 views

How to add Opencarto to a Geotools project?

I've installed geotools through maven (and m2ecplise) but i'm not able to add opencarto library to my project. (As you can guess, I'm new to java) I tried by adding opencarto's main folder as library ...
5
votes
2answers
4k views

How to parse KML data using geotools?

Geotools contains some packages dealing with KML: org.geotools.kml and org.geotools.kml.bindings. I assume it was designed to parse KML data. Do you know how to use it?
4
votes
1answer
2k views

Convert Gauss-Kruger to UTM

How to covert Gauss-Kruger coordinates to UTM coordinates with GeoTools java library? As I have figured out the location (zone, country) is important. I need the calculation for Slovenia.