georaster - Add spatialExtent and extentSRID create-option
|Reported by:||ilucena||Owned by:||ilucena|
So far in the process of loading a GeoRaster object into a table already populated with data and most important, with per-existing spatial index, users would need to set use -co SRID=999999 and updated it properly later in PL/SQL.
I propose two new create-option to solve that problem. SPATIALINDEX(boolean) to tell that users want to create the spatialExtent geometry and the EXTENTSRID to tell what would be the SRID of that geometry. If EXTENTSRID is not informed, the same SRID of the image will be used on the spatialExtent geometry.
So, for example, if a users loads a UTM raster and want a WGS84 spatialExtent, they could do it by combining -co SPATIALEXTENT=TRUE -co EXTENTSRID=4326. If that table/column has spatial index based on SRID 4326 that image will be inserted into the index.
If a attempt is made to load a GeoRaster object, creating a spatialExtent with an SRID different from the existing spatial index, the data will be loaded, a warning will be raised but the spatialExtent will not be created. I am wondering if it would be better not to load the image at all and raise a failure exception.