Re: [gdal-dev] Get SRID from image file

Ivan Lucena ivan.lucena at princeton-ma.us
Fri May 4 07:23:32 EDT 2012


Hi Billy,

>  
>  I did not know that existed.  A couple quick questions.
>  
>  1.  I do not want to store the entire raster file in the database. I just want to store the metadata, i.e. the bounding 
info and projection of the image file. The GeoRaster driver documentation made it seem like the entire raster file is 
being stored in the database.
>  
>  2. I am running java processes with either jdbc or hibernate. Can I use this driver?  Or is this only a command line 
utility?
>

Yes,

If you want to use this driver (GDAL/GEOR) you would need to load the data into the database, once it is there you 
can take advantage of the functions available for you in Oracle Spatial, or in the RDBMS itself like in any other data 
type.

You can use GDAL Java API as you normally do for any other GDAL supported formats. The only difference is that 
instead of passing a file name on GDAL.Open() you pass a connection string like "usr/pwd at db,tab,col,<where 
clause>".  If the where clause return a unique sdo_georaster object you are ready to go, if it returns more than one the 
driver returns a list  of SUBDATASETS (BTW, that is how QGIS browse for sdo_georaster using the Oracle Raster Plugin) 
then you parse the SUBDATASETS names as find each individual images.

Best Regards,

Ivan 
  
>  Thanks!
>  
>  On May 3, 2012, at 9:56 AM, "Ivan Lucena" <ivan.lucena at princeton-ma.us> wrote:
>  
>  >
>  > Billy,
>  >
>  > The GeoRaster driver will do that for you. It takes the EPSG Authority code from the input file and use it as SRID 
when loading the image to the database sdo_georaster object. For more info: http://gdal.org/frmt_georaster.html
>  >
>  > Regards,
>  >
>  > Ivan
>  >
>  >
>  >
>  >> -------Original Message-------
>  >> From: Billy Newman <newmanw10 at gmail.com>
>  >> To: gdal-dev at lists.osgeo.org
>  >> Subject: [gdal-dev] Get SRID from image file
>  >> Sent: May 03 '12 10:38
>  >>
>  >> I have some image files (geotiff's) and I would like to store some of
>  >> the metadata about the image files in oracle spatial.  Is there any way to
>  >> get the SRID for an image file?
>  >>
>  >> Thanks,
>  >> Billy
>  >>
>  >> --------------------
>  >> _______________________________________________
>  >> gdal-dev mailing list
>  >> [LINK: compose.php?to=gdal-dev at lists.osgeo.org] gdal-dev at lists.osgeo.org
>  >> [LINK: http://lists.osgeo.org/mailman/listinfo/gdal-dev]
>  >> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>  


More information about the gdal-dev mailing list