The OGR spatial engine provides support for additional formats not directly supported by Weave based on the OGR GDAL library, a list of the available formats is available here, note that link provides a list of the latest supported formats, which may include newer ones than those supported by Weave or newer parameters than are supported by Weave.
Different OGR drivers require different parameters, documented at the link above, but each spatial engine should have dbtype set to “ogr”, and a driverName corresponding to the OGR driver, or the dbtype set to the factory name of the driver. A list of the available OGR driver names is output to the weave.log file when Weave starts (at log level INFO), e.g.
14:50:49.434 INFO Available OGR drivers: ARCGEN, AVCBin, AVCE00, ..., WFS, XPlane
14:50:49.434 INFO Registering OGR data store factories for arcgen, avcbin, avce00, ..., wfs, xplane
The list of available OGR drivers are those that have been made available by the GDAL project and does not imply that it would make sense to actually use that driver with Weave.
Some OGR drivers only support a single table whereas others can be pointed to a source that contains multiple tables, e.g. you can point to a GeoJSON file that will only have one listed table, or a directory or MapInfo files that will list one table per file.
Namespace
urn:com.cohga.server.spatial.geotools#1.0
Tags
spatialengine
Properties
Name | Type | Required | Description |
id | string | yes | Unique identifier for the spatial engine |
dbtype | string | yes | If set to “ogr” then driverName will specify the OGR driver to use (from the list of available OGR drivers). |
driverName | string | yes - if dbtype is “ogr” | The name of the OGR driver to use if dbtype is “ogr”, otherwise it is not used |
datasourceName | string | yes - if dbtype is “ogr” | Points to the source of the data, will depend upon which OGR driver is used |
datasource | string | no - if dbtype is “ogr” | Points to the source of the data, will depend upon which OGR driver is used |
Sub-tags
None
Content
None
Notes
There will be additional properties required, which will depend upon the OGR driver in use.
Either datasourceName
or datasource
must be set. datasourceName
of dbtype is "ogr", and datasource
if dbtype is not "ogr".
Examples
Remote GeoJSON
<spatial:spatialengine id="states"> <dbtype>ogr</dbtype> <driverName>GeoJSON</driverName> <datasourceName>https://raw.githubusercontent.com/tonywr71/GeoJson-Data/master/australian-states.json</datasourceName> </spatial:spatialengine>
this could also be specified as
<spatial:spatialengine id="states"> <dbtype>geojson</dbtype> <datasource>https://raw.githubusercontent.com/tonywr71/GeoJson-Data/master/australian-states.json</datasource> </spatial:spatialengine>
Local MapInfo file
<spatial:spatialEngine id="works"> <dbtype>mapinfo_file</dbtype> <datasource>d:\spatial_data\mapinfo\works\</datasource> </spatial:spatialEngine>