Thanks Ivan. 

Unfortunately I was not being very clear. The process in which I am indexing 
the image files (storing their metadata in the database) is a java process. It 
is a complex application in which we keep track of the changes in a directory 
structure such that we can index new files dropped in or remove old files that 
have been removed. I was wondering if I could use the driver inside my java 
process, but it does not sound like it. 

Sounds like I might be able to try Palo's example and use the java bindings to 
extract the SRID from the images projection string. 

Thanks guys!

Sent from my iPhone

On May 4, 2012, at 5:23 AM, "Ivan Lucena" <ivan.luc...@princeton-ma.us> wrote:

> 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@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.luc...@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 <newman...@gmail.com>
>>>> To: gdal-dev@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@lists.osgeo.org] gdal-dev@lists.osgeo.org
>>>> [LINK: http://lists.osgeo.org/mailman/listinfo/gdal-dev]
>>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>> 

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to