[postgis-users] Storing image file metadata in PostGIS

Peter Baumann p.baumann at jacobs-university.de
Sun May 6 03:46:40 PDT 2012


Billy-

FWIW, as you anyway have to give your data a loving hand you may consider the 
modular OGC standards suite.

wrt data:
- GML 3.2.1 Application Schema for Coverages (GMLCOV), OGC's general coverage 
model (including nD space/time rasters) in a general, flexible, 
encoding-independent manner, and harmonized across multiple OGC service 
standards (such as WCS and WPS)
- Observations & Measurements (O&M) for modeling metadata alternatively (more 
flexibility, higher requirements on c/s)

wrt services:
- Web Catalog Service (CS-W) for generic metadata
- Web Coverage Service (WCS) 2 (don't use older versions!) for serving coverages 
(including nD spatio-temporal rasters)

FYI, OGC has an internally-ready candidate standard, WCS Application Profile for 
Coverages (EO-WCS), for integrated modeling + retrieval of Earth Observation 
data + metadata. If you wish I can send you material.

Both are implemented by the FOSS combination of EOxServer (candidate reference 
implementation EO-WCS) + rasdaman (candidate reference implementation WCS, WCPS) 
+ PostgreSQL + GDAL.

cheers,
Peter



On 05/06/2012 01:02 AM, Greg Williamson wrote:
> Billy Newman wrote:
>
>
>> Hello all,
>>
>> I am currently using a pain old Oracle (not Oracle Spatial) database to store metadata for a huge amount of imagery data.  I store this metadata for file discovery purposes.  I.E. when a request is made for imagery I can quickly hit the DB to get all overlapping image files.  I can then grab those off the file system and serve them out.
>>
>> I am using imageio-ext (Java) that sits on top of gdal to pull the imagery's metadata.  Then just sending that to the DB.
>>
>> I am probably doing this the hard way and wondering if PostGIS can help simplify things.
>>
>> I am wondering if PostGIS has support to store metadata for images, and what that support really gives me.  Currently I am serving out images in only EPSG:4326 so I want to do any transformations (if the image is not in EPSG:4326) to the metadata before storing it in the database.
> Used to work with a postGIS database doing exactly this --  lat/lon coordinates, image type [b/w, etc/], date, some information about scale so queries for imagery in a given area was very fast to retrieve (the image files themselves were stored on disk).
>
>
>> Can PostGIS read an image file and extract the metadata, transform the metadata into an EPSG:4326 lat/lon bounding box and store it?
> I am not familiar with all of the new raster data functionality in postGIS but at least earlier versions could not do this; GDAL perhaps can do this and then be used to load the data in postGIS. Not familiar with the imageio-ext tool you mention, sorry.
>
>
>
> Our DB started as Oracle (with an early spatial capability), migrated to Informix Spatial Blade, and
> then migrated to postgis so in and of itself this should not be a
> proble,, I had to do a little parsing of WKT to port from Informix to
> postGIS.
>
>
>> This is my current data model in Oracle if that helps:
>>
>> DataSource (this contains general info about this group of image files)
>> ImageFile ( each data source has 0 - N image files)
>> double minLat
>> double maxLat
>> double minLon
>> double maxLon
>>
>> Its as simple as that.  Although I am doing quite a bit of work using imageio-ext, and gdal to try and extract, transform, and store the metadata.  Is this less complex in PostGIS or essentially the same?
>
> It sounds as if you will still need to do some of the ETL work to get the data into postGIS in a consistent manner, but after that it should be easy to use postGIS as a data source. In general I have found postgresql to scale well although there can be  issues tuning for specific usage patterns, etc. You don't give specific numbers but we had no issues with a database with millions of rows of spatial data.
>
> The postgres mailing lists (the general ones as well as this one) are very helpful and polite. Lots of developers available to answer specific questions. Not as easy to do that with Oracle, me thinks.
>
> Best of luck!
>
> Greg Williamson
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-- 
Dr. Peter Baumann
  - Professor of Computer Science, Jacobs University Bremen
    www.faculty.jacobs-university.de/pbaumann
    mail: p.baumann at jacobs-university.de
    tel: +49-421-200-3178, fax: +49-421-200-493178
  - Executive Director, rasdaman GmbH Bremen (HRB 26793)
    www.rasdaman.com, mail: baumann at rasdaman.com
    tel: 0800-rasdaman, fax: 0800-rasdafax, mobile: +49-173-5837882
"Si forte in alienas manus oberraverit hec peregrina epistola incertis ventis 
dimissa, sed Deo commendata, precamur ut ei reddatur cui soli destinata, nec 
preripiat quisquam non sibi parata." (mail disclaimer, AD 1083)






More information about the postgis-users mailing list