An object-oriented cross-platform programming language developed by Sun Microsystems.

learn more… | top users | synonyms

1
vote
2answers
135 views

Creating a raster file from a shapefile using GeoTools with different colours for different features

The shapefiles that I am processing display information on an operation of a piece of equipment over an area, where the information is stored in steps as polygon features with various attributes and ...
0
votes
0answers
79 views

GeoServer java classes for database connection

I am new to java and geoserver, I have setup a postgis database of osm.xml data using osm2pqsql . My task now is to create a java module that will connect to an existing postgis database along with an ...
0
votes
0answers
9 views

Save JPlotLayout as image

package test.sgt; import java.awt.Dimension; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; import gov.noaa.pmel.sgt.ColorMap; ...
0
votes
0answers
9 views

Project netcdf data to a non-greenwich central meridian java [duplicate]

How to project -180.0º - 180.0º to 0.0º - 360.0º longitude in netcdf java.
0
votes
0answers
38 views

SST(Time,Lat,Lon) from NetCDF File [java] [jfreechart]

I want to plot data from netcdf file like an ocean model. Is there any way to transform LatLonProjection (-180.0 to 180.0): to this range (ocean model): And plot like this: I am using java ...
0
votes
2answers
140 views

Given a GeoJSON file how do I calculate the area of the embedded features?

We have a GeoJSON file that contains an array of features each with their associated geometry. How can I calculate the area of each feature? Are there any Java or Swift libraries to help me? Any ...
2
votes
0answers
46 views

What are the geotiff limitations of geotools?

I'm trying to process globcover, which is a .tif file of 374mb. Running the following code: File tiffFile = new File("C:\\Users\\CAA\\Desktop\\test.tif"); GeoTiffReader reader = new ...
0
votes
1answer
33 views

My osm2po java program compiles but gives a runtime error

I need road distances and I'm trying to use osm2po to do this. After downloading the OSM files and converting them to gph format, using the osm2po program, I start at the very beginning with the ...
0
votes
2answers
75 views

JTS Vividsolutions API: compute First (direct) geodetic problem

I'm using the popular JTS Vividsolutions API for Java. I'm struggling to find if I can perform calculation of the First (direct) geodetic problem with the API. Is there a way to calculate this with ...
0
votes
0answers
54 views

Can't read GeometryCollection from Json String with java 8

I've got a problem with geotools and Java 8: since I started working with it, GeometryJSON can't read jts GeometryCollection from a Json String. Here an example: import java.io.ByteArrayInputStream; ...
1
vote
0answers
52 views

How to configure HTTP requests between two applications on OpenShift

I have deployed a GeoServer and a Java EE REST API on OpenShift as non-scalable applications. From the REST API I'm trying to connect to GeoServer using Apache httpclient. When I'm requesting ...
0
votes
0answers
47 views

Sr Lock on created gdb is not releasing

My problem is sr lock is not releasing on gdb , also please see that code can be improved? Below is my code public String exportGDB(String whereClause,IServerObjectHelper serverObjectHelper) // ...
1
vote
0answers
115 views

GeoTools: Lambert72 to WGS84

I am trying to convert coordinates (and polygons from com.vividsolutions.jts.geom) in Lambert72 (EPSG:31370) to WGS84 (or the other way around). I'm using the org.geotools.referencing CRS and ...
1
vote
0answers
84 views

How to get image coordinate and corresponding location coordinate of a geo-referenced image in andriod

In my android app, I have a geo-referenced image which I am going to use as map. So I need to divide it into tiles. For that I want its top left and bottom right image coordinate(x,y) with location ...
1
vote
0answers
33 views

Performing Geographic Weighted Regression (GWR) in Java?

Is there any existing GWR (Geographic Weighted Regression) packages in Java? The packages should be able to conduct the basic GWR, the bandwidth optimation and some significance test.
1
vote
0answers
17 views

GeoTools FeatureCollection to Filter (make Filter from a FeatureCollection)

I have a FeatureCollection and I want to make a Filter of them. One way is that I may use FilterFactory#id(Set<Identifier> set) to make a filter. FilterFactory ff = ...
0
votes
0answers
153 views

How to convert world coordinates to screen coordinates (pixels)

I am trying to export and display an SVG file, the exporting works, I even added some custom grouping. However the image is either not displayed at all or not displayed properly (very small and lines ...
1
vote
0answers
40 views

html file not loading google maps and current location

I have a html file that when I click on it, it should open in a browser but it does not load. The link of the html opens and loads the image. Below is the link: ...
1
vote
1answer
50 views

Why modes are represented with numbers, that are powers of 2.? [closed]

In TraverseModeSet class of org.opentripplanner.routing.core package, Modes are represented using integer numbers , those are powers of 2. Why? private static final int MODE_BICYCLE = 1; private ...
1
vote
0answers
39 views

Create a Geotiff with different colors

I have a geotiff raster image. I have estracted the WritableRaster, the envelope, and the gridsampleDimension I need to create a new geotiff using Geotools. GridCoverageFactory gcf = new ...
0
votes
1answer
30 views

An interactive, animated deliverable (i.e. in PDF)? How?

I'm wondering if it's possible to make something like this: http://tipstrategies.com/geography-of-jobs/ But in the form of a deliverable? Like a PDF? I'd like to make something similar that I could ...
1
vote
0answers
46 views

Route between two coordinate points via line

I tried to search for an answer but couldn't find any so I decided to ask. I would like to ask which would be the best way to get the shortest (and the only one) route between two points from a part ...
0
votes
0answers
47 views

Change color of feature by ID (GeoTools)

I am trying to change the color of a specific object, by ID (or another feature). Currently I am able to extract data about an shapefile and display that data. However, I want to be able to change the ...
1
vote
0answers
68 views

Error on Map Style Tutorial

Trying to follow the Map Style tutorial, as the functionality of changing color of objects selected is one thing I am trying to add to my project. However, after running the code from the tutorial I ...
1
vote
0answers
26 views

Error in: org.geotools.swing.MapLayerTableCellRenderer.getListCellRendererComponent

Getting this error while exporting an shapefile to svg (courtesy to iant): The weird thing is I wasn't getting this error before, but I just suddenly starting getting it after running my application, ...
1
vote
2answers
121 views

PostGIS: ST_Within returns “t”/“f” letters instead of “true”/“false” booleans

I have simple query which contains among others: SELECT ST_Within(ST_GeomFromText('POINT(lon lat)', 4326), buildings.geom) AS is_within So I expect the result column is_within to be Boolean value. ...
1
vote
0answers
31 views

Export shapefile layers to svg [closed]

I have an application that exports an SVG after reading in a shapefile (thanks to iant for the exporting bit). You can view the code here: Exporting Shapefile to SVG using Java & GeoTools? What ...
0
votes
0answers
98 views

JSF2Leaf - JSF page parameters to bean

I'm using jsf2leaf framework to draw trajectories between two markers, like example. I need to send two parameters (id of point) to search possible trajectories between both. At the moment the ...
0
votes
0answers
14 views

Geoserver+AIS+adsb [duplicate]

I am trying to make a web application with a map server and two receivers one for ais and the other for planes. The project will be without the use of internet maps inside LAN. Is it possible to do ...
0
votes
0answers
35 views

How to draw traffic line in small two-way street like google traffic?

I am making an app with some function same as a traffic map. But I have been stuck with below problem for weeks I have used the "Snap to roads" method to match GPS data from mobile device to road ...
3
votes
1answer
246 views

Exporting Shapefile to SVG using Java & GeoTools?

I am currently working on how to read in ESRI shapefiles, parse/edit layers and then export out to SVG (Scalable Vector Graphic) file type. I have been using GeoTools primarily for reading/loading ...
1
vote
0answers
40 views

How to use ST_fromGDALRaster correctly with a given GeoTIFF

I am trying to import gdal raster data (a GeoTIFF) to a Postgis database, using the ST_FromGDALRaster method (http://postgis.net/docs/manual-2.1/RT_ST_FromGDALRaster.html). The question is that I ...
1
vote
1answer
299 views

Create shapefile based on geojson data with geotools (Java)

I'm using Geotools 14.0 for Java and I'm trying to generate shapefile based on data from GeoJSON. Here is my code: try { String url = "geojson.json"; File geojson = new File(url); ...
2
votes
1answer
83 views

Small GeoTiff of the world very slow when zoomed in to city level

I'm new to GeoTools and as a start I'm trying to display a small GeoTiff file on a map . The GeoTiff files I'm using are under 10MB (for example a 1MB file at 720x360 pixels) and covers the entire ...
1
vote
0answers
29 views

Geoserver: Problem with default styles

Somehow, many of the layers in Geoserver got misconfigured. I can not say how this exactly happend, since this also applies to layers I have not even touched in a while. When I try to query the ...
2
votes
2answers
73 views

How to use IDatabaseConnectionInfo3 Interface ArcObjects!

I try to retrive the connected users from an entreprise geodatabase using ArcObjects . first I tried to cast My workspace to IDatabaseConnectionInfo3 but it throws ClassCastException ...
0
votes
0answers
17 views

Set Proxy GeoServer Manager API 1.5.2

I'm new to geoserver manager api, and wanted to know how to set the proxy to use the GeoServerRESTPublisher and GeoServerRESTPublisher classes because my geoserver is remote and my internet ...
1
vote
0answers
92 views

Adding rasters with GeoTools

I'm using org.geotools.process.raster.AddCoveragesProcess class, to add two raster's with same resolution and buonding box. I get the following exception java.lang.IllegalArgumentException: Range ...
-1
votes
1answer
48 views

How to order points on a road linestring to follow the road

So I'm using a osm2pgsql schema. When I get a road, the points in the linestring don't have an order, so when I try to draw the road, it won't follow the road but will be a bunch of lines. Do I have ...
2
votes
1answer
77 views

UnsatisfiedLinkError caused by org.gdal.ogr.ogrJNI.GetDriverCount()

I am developing in Java on Windows 7 with Eclipse (Luna). I am using gdal for some ogr processes and running the application from eclipse is fine, but running from command line on the same machine ...
1
vote
0answers
100 views

How add two coverages with different bounding-box and different resolution using geotools

I'm developing a Java application with some spatial analysis operations. One of the operations is to add two coverages. But how can I add two coverages with different bounding-box and different ...
0
votes
0answers
141 views

Calculating intersection between lines with GeoTools (java)

I have ArratList<Segment> (N segments - array size is N) when: public class Segment { Node vertex_1; Node vertex_2; } public class Node { double latitude; double longitude; } ...
1
vote
0answers
37 views

Create compressed GeoTiff in Java

I've got a typical two-dimensional array in Java with values which represent a grid. Rows, columns, coordinate system (latlon), origin and cell size are known. I am able to export this data as ASCII ...
0
votes
0answers
250 views

draw a map from encoded polylines

I'm using the google maps web services service to find a route. From the json response I parse it encoded polylines and store it on coordinates String. private String parseJson(String s){ String ...
1
vote
1answer
191 views

PermGenSpace error in Tomcat with geonetwork 3.0

I'm running a geonetwork 3.0.1 instance on tomcat7. Regularly, i.e. every few actions of my only user, my tomcat runs into a PermGenSpace error. This especially occurs during harvesting of other ...
0
votes
0answers
195 views

Use postgis functions in restful web service java

I am trying to access Postgis functions in Restful web service JAVA. I am using netbeans 8.0.2, Glass Fish, J2EE 7 to create web service, PostGres 9.2 and postgis 2.1.1. Connection to postgres is ...
1
vote
1answer
63 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 ...
3
votes
0answers
53 views

Geoserver: Exception when importing KML

I have a KML that I would like to import into Geoserver. The KML originates from a Geoserver WFS getFeature Request itself and looks like this: <?xml version="1.0" encoding="UTF-8" ...
5
votes
1answer
533 views

Algorithm to find N nearest points to point

My situation is that i'm trying to build a mobile app, and find the x number of points closest to a users location that satisfy certain conditions that the user chooses on the front end. My current ...
1
vote
1answer
107 views

How to select from geometry column in postgresql?

I've got a table which it has a geometry column filed by some point (ex. "POINT Z (116.309627 39.991285 148)"). now I want to select point's id from the table. I wrote follow sql Code but I force an ...