ogr tileindex with postgis?
Neil Best
nbest at LANWORTH.COM
Thu Sep 20 14:45:09 PDT 2007
On Thu, 20 Sep 2007 12:47:31 -0400, Frank Warmerdam <warmerdam at POBOX.COM> wrote:
>Neil Best wrote:
>> Is it possible to use a PostGIS table as a tileindex? The docs seem to
>> indicate so, but I could not find an example of how to connect to
>> PostGIS through CONNECTIONTYPE OGR.
>
>Are you wanting to use postgis as a tileindex for a raster or a vector
>layer? I only have experience doing this for raster layers, but it might
>also work for vector layers.
>
Yes, Frank, it is for raster layers. Gregor was quite right to wonder what
the advantage of tileindexing vector layers if PostGIS is being used properly.
>Generally if you want to use postgis for a tileindex, you need to create
>a seperate tileindex layer and then reference that layer by name in the
>TILEINDEX keyword of the tiled layer.
It worked like a charm! (Except now something is wrong with my legends . .
. gremlins!) I never would have thought of referring to a layer from
another layer and I don't recall mention of it in my scouring of the docs.
Are there other applications/examples of this technique?
I have some ideas about how to use this table as a unified raster catalog.
As I understand it a TILEINDEX must be in the same projection as the rasters
to which it refers. I am imagining that I can still use this table for a
heterogeneous collection (e.g. NAIPs are in UTM zones) because I can set up
views that provide the tile geometry in the proper SRS while still
maintaining a geometry column in our default SRS*. Furthermore this will
allow me to define a cross-section of the collection using SQL which will be
useful in accessing rasters along the time dimension and any other way based
on the path/file or any additional attributes. This table will serve an
additional purpose in keeping track of automated, near-real-time data
ingests. Frank, maybe your
experiences have taken you in similar directions. I presume that you will
be in Victoria next week -- maybe I could corner you to discuss this
further. Thanks for the tip; this will be very useful.
Neil
*Which happens to be an Albers Equal Area for the continental US that has no
EPSG code. I find this strange because I believe that it comes from the
USGS and is widely used, but what do I know? I'll attach the WKT for
inspection -- maybe it could be adopted if there was enough interest.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aeaConus.wkt
Type: application/octet-stream
Size: 152 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070920/72c0c2cd/attachment.obj>
More information about the MapServer-users
mailing list