[Gdal-dev] OGR Virtual Layers
jeanhri4 at ifrance.com
jeanhri4 at ifrance.com
Wed Nov 5 04:04:51 EST 2003
This project might be very useful.
For example to connect to data source generated from GPS knowing that
it's possible to connect to such data source via ODBC or ADO Driver
(Equivalent to text file).
Would you be interested to implement the following extra functionality?
-> Create Feature with line geometry from ordered set of points x,y ?
Indeed, a lot of data sources contains ordered points (as X,Y). To do
this, these points share a common FID (the Feature one) and an order
field (may be chronological or a given number).
For example: a Route made of Way Points. (Frequently used by GPS system)
GPS: WGS 84 - Lat(y) Lon(x) in Decimal Degree
FID/ORDER/Y/X
1;1;10.25;50.5
1;2;10.35;51.5
1;3;11.00;52.5
2;1;10.25;55.5
2;2;15.25;59.5
Result-> Two Features FID = 1 with 3 points and FID = 2 with 2 Points.
The XML configuration could be
<OGR_VirtualDatabase>
<OGR_VirtualLayer name="RootWormReports">
<SourceDatasource>ODBC:guest/anonymous at agcan_main</SourceDatasource>
<SourceLayer>RootWormReports</SourceLayer>
<GeometryType>Point</GeometryType>
<GeometryField encoding="xy" x="ReportLong" y="ReportLat"/>
<OrderingField encoding="order" order="ORDER"/>
<LayerSRS>GEOGCS...</LayerSRS>
</OGR_VirtualLayer>
</OGR_VirtualDatabase>
Jean.
-----Message d'origine-----
De : gdal-dev-admin at remotesensing.org
[mailto:gdal-dev-admin at remotesensing.org] De la part de Frank Warmerdam
Envoyé : lundi 3 novembre 2003 18:47
À : gdal-dev
Objet : [Gdal-dev] OGR Virtual Layers
Folks,
For a contract I have, I need to implement "Virtual OGR Datasources".
The
primary goal in this case is to allow a virtual OGR data source to use
an existing driver (such as the ODBC driver, or Oracle driver) to read
non-spatial tables, and select columns to use as X, and Y to return a
"spatial points" layer to an OGR application.
However, at the same time I am thinking about other things I would like
to accomplish with such a virtual datasource concept.
So far I have:
* Assigning a coordinate system. (required)
* Constructing geometry from x/y columns. (required)
* Constructing geometry from WKT or WKB columns.
* Using geometry directly from the source.
* renaming, or subsetting columns list.
* Assigning a layer geometry type.
* Altering column types (string to int for instance), or precision
information.
* treating an SQL query on the source datasource as a table in the
virtual layer.
* memory or disk based caching.
* virtual files should be openable from disk based XML config file, or
an in memory
XML definition.
* pass through SetFeature and CreateFeature.
* A method to create a virtual datasource cloning a real datasource.
This could
then be hand edited to make minor changes in configuration.
* The ability to control whether attribute and/or spatial queries are
"passed
through".
I am imagining virtual datasources being controlled by an XML
configuration
file that might look something like this:
<OGR_VirtualDatabase>
<OGR_VirtualLayer name="RootWormReports">
<SourceDatasource>ODBC:guest/anonymous at agcan_main</SourceDatasource>
<SourceLayer>RootWormReports</SourceLayer>
<GeometryType>Point</GeometryType>
<GeometryField encoding="xy" x="ReportLong" y="ReportLat"/>
<LayerSRS>GEOGCS...</LayerSRS>
</OGR_VirtualLayer>
</OGR_VirtualDatabase>
In general, the idea is that the virtual datasource provides an
opportunity to
"fix up" lots of things that aren't easily done within individual format
drivers.
Best regards,
--
---------------------------------------+--------------------------------
------
I set the clouds in motion - turn up | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
_______________________________________________
Gdal-dev mailing list
Gdal-dev at remotesensing.org
http://remotesensing.org/mailman/listinfo/gdal-dev
_____________________________________________________________________
Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France
_____________________________________________________________________
Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France
More information about the Gdal-dev
mailing list