Database Administrators
Q&A for database professionals who wish to improve their database skills
Latest Questions
5
votes
4
answers
1242
views
Best way to model a database structure to store multidimensional variables?
I am working with some [NetCDF][1] data which has multidimensional variables. - As far as I'm aware, the fields are not mandatory. - Each variable will have the same fields/attributes. - Each variable represents a measurement of the atmosphere, in time & space. `Level` represents a pressure level (l...
I am working with some NetCDF data which has multidimensional variables.
- As far as I'm aware, the fields are not mandatory.
- Each variable will have the same fields/attributes.
- Each variable represents a measurement of the atmosphere, in time & space.
Level
represents a pressure level (like a layer of an onion -- a thick layer).
For example, a variable
called *SO2* (Sulphur Dioxide) may be *4-D*: Time
, Level (pressure)
, latitude
, longitude
.
I have about 14 variables that I need to store.
**Data retrieval tendencies**
Now, I'm going to need to query this data and ask questions like:
- Give me all the rows for variable
*SO2* that fall between latitude
*X* and longitude
*Y* at time
*T* and level
*L*.
- What is the average temperature
for time
*T* at level
*L*?
- etc...
**Current considerations**
I could let each row in my DB be an observation
and have the columns: type
, lat
, long
, time
, level
, value
.
Or, perhaps create a table for each kind of variable
and have the columns: lat
, long
, time
, level
, value
.
I'm not sure which will be more appropriate, or whether there is a better option, so I'd appreciate some advice.
pookie
(181 rep)
Feb 8, 2017, 08:43 PM
• Last activity: Aug 6, 2017, 04:59 PM
2
votes
1
answers
2196
views
rt_raster_to_gdal: Could not load the output GDAL driver
I have already set the environment in windows SET postgis.gdal_enabled_drivers = 'ENABLE_ALL'; Even I tried by adding following in environment path- POSTGIS_GDAL_ENABLED_DRIVERS=ENABLE_ALL But still I am getting error: > ERROR: rt_raster_to_gdal: Could not load the output GDAL driver SQL The query I...
I have already set the environment in windows
SET postgis.gdal_enabled_drivers = 'ENABLE_ALL';
Even I tried by adding following in environment path-
POSTGIS_GDAL_ENABLED_DRIVERS=ENABLE_ALL
But still I am getting error:
> ERROR: rt_raster_to_gdal: Could not load the output GDAL driver SQL
The query I am running is
SELECT ST_AsGDALRaster(rast, 'GTiff') As rastjpg
FROM myRaster WHERE rid=1;
How to remove this issue?
Padfoot
(175 rep)
Apr 16, 2015, 05:53 PM
• Last activity: Jun 30, 2017, 10:09 PM
2
votes
2
answers
2047
views
Creating a unique constraint on a PostGIS 'raster' type column
I am using the following command to add constraints to one of the raster image in PostGIS-2.1.3 (PostgreSQL-9.1.14). ALTER TABLE schema1.table1 ADD CONSTRAINT enforce_scalex_rast unique (rast); But getting the following errors: ERROR: data type raster has no default operator class for access method...
I am using the following command to add constraints to one of the raster image in PostGIS-2.1.3 (PostgreSQL-9.1.14).
ALTER TABLE schema1.table1 ADD CONSTRAINT enforce_scalex_rast unique (rast);
But getting the following errors:
ERROR: data type raster has no default operator class for access method "btree"
HINT: You must specify an operator class for the index or define a default operator class for the data type.
Kindly someone help me to fix this error up. I have no basic idea about the operator classes. Thx.
Zia.
Zia
(169 rep)
Aug 19, 2014, 07:39 AM
• Last activity: Feb 9, 2017, 12:11 AM
Showing page 1 of 3 total questions