-
Notifications
You must be signed in to change notification settings - Fork 1
SystemDocumentationLayersStore
linaizhong edited this page Nov 19, 2014
·
3 revisions
API and utils for contextual, environmental, distribution and checklist layers.
Utils operate on local files and Postgres/PostGIS.
- WEB-INF/classes/layer.properties, update for the environment.
- GEOSERVER_URL=http://spatial.ala.org.au/geoserver
- GEONETWORK_URL=http://spatial.ala.org.au/geonetwork
- GDAL_PATH=/usr/local/gdal/apps/
- WEB-INF/spring/data-config.xml, update for Postgres.
For utilities
- unpack layers-store-1.0.0-SNAPSHOT-assembly.jar
- configure
- run utils from unpacked directory. e.g. java -Xmx10000m -cp .:lib/org.ala.layers.grid.GridCacheBuilder
<params>
- org.ala.layers.grid.GridCacheBuilder
- build a fresh grid cache using diva grids in ready/diva and output to ready/diva_cache
- org.ala.layers.grid.GridCacheReader
- test grid cache performance
- org.ala.layers.tabulation.TabulationGenerator
- progressive steps to update postGIS table layersdb.tabulation
- org.ala.layers.util.AnalysisLayerUtil
- Build resolutions standardised grids using layersdb.fields enabled grids and shapes in ready/diva and ready/shape.
- Outputs diva grid files as analysis/
<resolution>/<field.id>
- org.ala.layers.util.Bil2diva
- Convert a .bil/.hdr to .gri/.grd
- org.ala.layers.util.Diva2bil
- Convert a .gri/.grd to .bil/.hdr
- org.ala.layers.util.IntersectUtil
- Intersect coordinates with layers
- org.ala.layers.stats.ObjectsStatsGenerator
- Updates layersdb.objects table with bbox and consistently calculated area sqkm.
Batch sampling example
String points = "-22,132,-23,131";
String fields = "cl22,el804";
LayerIntersectDAO layerIntersectDAO = Client.getLayerIntersectDAO();
IntersectUtil.writeSampleToStream(fields.split(","), points.split(","), layerIntersectDAO.sample(fields, points), System.out);
There are 3 types of sampling functions available in LayerIntersectDAO
- samplingFull; returns additional information on a single point for a list of field ids (or layer names). This includes the layer display name, pid, and some other stuff. Used with the hover tool.
- sampling(String fieldIds, String pointsString), sampling(Stringwiki/ fieldIds, doublewiki/wiki/ points), sampling(IntersectionFilewiki/ intersectionFiles, doublewiki/wiki/ points); * These are general batch sampling that operate on a list of points. Appropriate for large numbers of points. There is a ws that uses these. * Webportal should be using this but for now duplicates the functionality here. * The output is an array of Strings, with each String being a single \n separated column for the input field ids. * This permits operations on a large number of points without as much overhead as java Strings usually imposes. Any variation on String wiki/wiki/ has poor performance.
- sampling(double longitude, double latitude) and sampling(String fieldIds, double longitude, double latitude); Both of these make use of the GridCache and any configured shapeFileCache (see layer.properties or IntersectConfig for dynamic additions). * The first, sampling(long,lat), returns only values in the grid or shape caches. Its purpose is to provide the fastest method of returning intersections on all layers for a specified point. It would be used (below an IO determined threshold) in place of the batch sampling for smaller number of occurrences when sampling on all layers. * The second, sampling(String fieldIds, double longitude, double latitude) does the same but will still return results for the specified fields if they are not cached.
Documentation
- Getting started
- ALA Spatial Portal
- Introduction
- ALA Spatial Portal UI
- ALA Spatial Analysis Service
- ALA Spatial Layers Service
- ALA Spatial Actions
- Production Environment
- Testing Sequence
- System documentation
- webportal
- alaspatial
- layers-service
- layers-store
- local file
- layers database
- geoserver
- Geonetwork and ANZMET Lite
Additional Technical Information