Tag Info

New answers tagged

0

Fixed it. typeBuilder.add("geom", Point.class); should be: typeBuilder.add("the_geom", Point.class); Not sure why it worked before then. Either I don't remember changing that line (not sure why I would though), or perhaps some earlier version of GeoTools just "geom" worked. Looks like I may have picked it up from part of the javadoc that did not get ...


1

I think the application server will be doing very little so I would just go with whatever web framework you are already familiar with. You can configure GeoServer completely using their REST API and you can manipulate/query the data directly from GeoServer using WMS/WFS (preferably with JSONP) without having to touch PostGIS directly. All the application ...


0

You can download UTM border shapefiles from the official source http://earth-info.nga.mil/GandG/coordsys/grids/universal_grid_system.html. Compute the centroid of each zone (an easy task for every GIS software) and save the coordinates of the centroid points for further use.


0

Your taiwan-latest.osm.pbf only contains raw OpenStreetMap-Data in a structured compressed binary format (pbf). It must be converted in order to produce a routable graph-file (*.gph) for osm2po or for pgRouting (*.sql). Please read the online-help or start the demo.bat / demo.sh to see how it works and to generate your first *.gph-File you can play with.


2

The following is the Java source code for the Import SRTM tool in the open-source GIS Whitebox GAT, for which I am a developer. You can use it as an example for how to convert the endianness of the data to that of the system. https://code.google.com/p/whitebox-geospatial-analysis-tools/source/browse/trunk/ImportExport/src/plugins/ImportSRTM.java Feel free ...


0

Geotools is a powerful library, and can read from PostGIS, for example, and can export to ShapeFile, for example, using the "Feature" object. I cann't show you a complete "example", but it's easy to find out a way to do it, in Google.


0

Using OSM for such a simple task seems like overkill. Take a look at the downloads provided by Natural Earth instead. If you really want to use OSM then you have to extract the coastline tagged with natural=coastline. You don't have to extract it yourself because there are already various sources offering pre-processed OSM data, for example OpenStreetMap ...


0

I came across this It is very simple. Example: for gdal_polygonize hello.png bla you can use: import java.io.IOException; import org.apache.commons.exec.CommandLine; import org.apache.commons.exec.DefaultExecutor; import org.apache.commons.exec.ExecuteException; public class Test { public static void main(String[] args) throws ...


1

Here is a working and simpler solution I found: Intersect intersect = new Intersect(in1 + ";" + in2, out); where in1 , in2 and out are strings giving the full path of input and output feature class.


0

A generic Java answer is: Use the BigDecimal class. Hope this will work with your specific implementation too...


0

I finally figured it out... this code assumes that the geotif is in wgs84 (4326) proj, but it works well for getting the lat long for each pixel, and the band values for each pixel (formatted as a csv here). Hope this helps. import com.spatial4j.core.io.GeohashUtils; import java.awt.geom.Rectangle2D; import org.geotools.coverage.grid.GridCoverage2D; import ...



Top 50 recent answers are included