public class PostGISSpatialDataDao extends Object implements SpatialDataDao
Modifier and Type | Class and Description |
---|---|
static class |
PostGISSpatialDataDao.Provider |
Modifier and Type | Method and Description |
---|---|
void |
beginSaveGeometries()
This should be called prior to any saveGeometry() calls.
|
void |
endSaveGeometries()
This should be called at the end of a spatial data loading process (when all the saveGeometry() calls are completed).
|
Map<Integer,com.vividsolutions.jts.geom.Geometry> |
getAllGeometriesInLayer(String layerName)
Gets all the geometries in a given layer, assumes 'earth' reference system
|
Map<Integer,com.vividsolutions.jts.geom.Geometry> |
getAllGeometriesInLayer(String layerName,
Precision.LatLonPrecision minPrecision)
Gets all the geometries in a given layer with a minimum precision, assumes 'earth' reference system
|
Map<Integer,com.vividsolutions.jts.geom.Geometry> |
getAllGeometriesInLayer(String layerName,
String refSysName)
Gets all the geometries in a given layer.
|
Map<Integer,com.vividsolutions.jts.geom.Geometry> |
getAllGeometriesInLayer(String layerName,
String[] notInLayers,
String refSysName)
Gets all geometries in layerName that are not in notInLayers
|
Iterable<String> |
getAllLayerNames(String refSysName)
Gets the names of all loaded layers.
|
Iterable<String> |
getAllRefSysNames()
Gets the names of all loaded reference systems.
|
Map<Integer,com.vividsolutions.jts.geom.Geometry> |
getBulkGeometriesInLayer(List<Integer> idList,
String layerName,
String refSysName) |
Map<String,com.vividsolutions.jts.geom.Geometry> |
getGeometries(int itemId)
Gets all geometries associated with a given Wikidata item id (all layers, all reference systems)
|
com.vividsolutions.jts.geom.Geometry |
getGeometry(int itemId,
String layerName)
Gets a geometry by Wikidata item id and layer name.
|
com.vividsolutions.jts.geom.Geometry |
getGeometry(int itemId,
String layerName,
Precision.LatLonPrecision minPrecision)
Gets a geometry by Wikidata item id, layer name, and minimum precision.
|
com.vividsolutions.jts.geom.Geometry |
getGeometry(int itemId,
String layerName,
String refSysName)
Gets a geometry by Wikidata item id, layer name, and reference system name.
|
com.vividsolutions.jts.geom.Geometry |
getGeometry(String articleName,
Language language,
String layerName)
Gets a geometry by article name, language, and layer.
|
com.vividsolutions.jts.geom.Geometry |
getGeometry(String articleName,
Language language,
String layerName,
Precision.LatLonPrecision minPrecision)
Gets a geometry by article name, language, layer, and minimum precision.
|
com.vividsolutions.jts.geom.Geometry |
getGeometry(String articleName,
Language language,
String layerName,
String refSysName)
public Geometry getGeometry(String articleName, Language language, String layerName) throws DaoException;
|
SpatialContainerMetadata |
getLayerMetadata(String layerName,
String refSysName)
Gets the metadata for a given layer
|
SpatialContainerMetadata |
getReferenceSystemMetadata(String refSysName)
Gets the metadata for a given reference system.
|
void |
optimize()
Optimizes the database, if necessary.
|
void |
removeLayer(String refSysName,
String layerName)
Removes the layer with the given reference system.
|
void |
saveGeometry(int itemId,
String layerName,
String refSysName,
com.vividsolutions.jts.geom.Geometry g)
Saves a geometry.
|
public com.vividsolutions.jts.geom.Geometry getGeometry(int itemId, String layerName, String refSysName) throws DaoException
SpatialDataDao
getGeometry
in interface SpatialDataDao
DaoException
public Map<String,com.vividsolutions.jts.geom.Geometry> getGeometries(int itemId) throws DaoException
SpatialDataDao
getGeometries
in interface SpatialDataDao
DaoException
public Map<Integer,com.vividsolutions.jts.geom.Geometry> getAllGeometriesInLayer(String layerName, String refSysName) throws DaoException
SpatialDataDao
getAllGeometriesInLayer
in interface SpatialDataDao
DaoException
public Map<Integer,com.vividsolutions.jts.geom.Geometry> getAllGeometriesInLayer(String layerName) throws DaoException
SpatialDataDao
getAllGeometriesInLayer
in interface SpatialDataDao
DaoException
public Map<Integer,com.vividsolutions.jts.geom.Geometry> getAllGeometriesInLayer(String layerName, Precision.LatLonPrecision minPrecision) throws DaoException
SpatialDataDao
getAllGeometriesInLayer
in interface SpatialDataDao
minPrecision
- See definition of LatLonPrecisionDaoException
public Map<Integer,com.vividsolutions.jts.geom.Geometry> getAllGeometriesInLayer(String layerName, String[] notInLayers, String refSysName) throws DaoException
SpatialDataDao
getAllGeometriesInLayer
in interface SpatialDataDao
refSysName
- the reference system for both layerName and notInLayersDaoException
public Iterable<String> getAllRefSysNames() throws DaoException
SpatialDataDao
getAllRefSysNames
in interface SpatialDataDao
DaoException
public Iterable<String> getAllLayerNames(String refSysName) throws DaoException
SpatialDataDao
getAllLayerNames
in interface SpatialDataDao
DaoException
public SpatialContainerMetadata getReferenceSystemMetadata(String refSysName) throws DaoException
SpatialDataDao
getReferenceSystemMetadata
in interface SpatialDataDao
DaoException
public SpatialContainerMetadata getLayerMetadata(String layerName, String refSysName) throws DaoException
SpatialDataDao
getLayerMetadata
in interface SpatialDataDao
DaoException
public com.vividsolutions.jts.geom.Geometry getGeometry(int itemId, String layerName) throws DaoException
SpatialDataDao
getGeometry
in interface SpatialDataDao
DaoException
public com.vividsolutions.jts.geom.Geometry getGeometry(int itemId, String layerName, Precision.LatLonPrecision minPrecision) throws DaoException
SpatialDataDao
getGeometry
in interface SpatialDataDao
minPrecision
- See definition of LatLonPrecisionDaoException
public com.vividsolutions.jts.geom.Geometry getGeometry(String articleName, Language language, String layerName) throws DaoException
SpatialDataDao
getGeometry
in interface SpatialDataDao
articleName
- (e.g. "Minnesota", "Minneapolis", "Kalifornien")language
- (e.g. Language.EN, Language.DE)layerName
- (e.g. Layers.STATE)DaoException
public com.vividsolutions.jts.geom.Geometry getGeometry(String articleName, Language language, String layerName, Precision.LatLonPrecision minPrecision) throws DaoException
SpatialDataDao
getGeometry
in interface SpatialDataDao
minPrecision
- See definition of LatLonPrecisionDaoException
public com.vividsolutions.jts.geom.Geometry getGeometry(String articleName, Language language, String layerName, String refSysName) throws DaoException
SpatialDataDao
getGeometry
in interface SpatialDataDao
articleName
- (e.g. "Minnesota", "Minneapolis", "Kalifornien")language
- (e.g. Language.EN, Language.DE)layerName
- (e.g. Layers.STATE)refSysName
- (e.g. Layers.EARTH)DaoException
public Map<Integer,com.vividsolutions.jts.geom.Geometry> getBulkGeometriesInLayer(List<Integer> idList, String layerName, String refSysName) throws DaoException
getBulkGeometriesInLayer
in interface SpatialDataDao
idList
- an iterable of ids of geometriesrefSysName
- the reference system for both layerName and notInLayersDaoException
public void beginSaveGeometries() throws DaoException
SpatialDataDao
beginSaveGeometries
in interface SpatialDataDao
DaoException
public void endSaveGeometries() throws DaoException
SpatialDataDao
endSaveGeometries
in interface SpatialDataDao
DaoException
public void saveGeometry(int itemId, String layerName, String refSysName, com.vividsolutions.jts.geom.Geometry g) throws DaoException
SpatialDataDao
saveGeometry
in interface SpatialDataDao
DaoException
public void removeLayer(String refSysName, String layerName) throws DaoException
SpatialDataDao
removeLayer
in interface SpatialDataDao
DaoException
public void optimize() throws DaoException
SpatialDataDao
optimize
in interface SpatialDataDao
DaoException
Copyright © 2015. All rights reserved.