Updating all bands of PostGIS raster in one function (like st_setvalues) with one geomval[] set?Modeling data...
If I cast Expeditious Retreat, can I Dash as a bonus action on the same turn?
How to make payment on the internet without leaving a money trail?
Why don't electron-positron collisions release infinite energy?
How does one intimidate enemies without having the capacity for violence?
Compute hash value according to multiplication method
A function which translates a sentence to title-case
Are tax years 2016 & 2017 back taxes deductible for tax year 2018?
Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?
How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?
Continuity at a point in terms of closure
Prevent a directory in /tmp from being deleted
Why is the design of haulage companies so “special”?
Infinite past with a beginning?
How long does it take to type this?
If Manufacturer spice model and Datasheet give different values which should I use?
N.B. ligature in Latex
A Journey Through Space and Time
What is the offset in a seaplane's hull?
Do airline pilots ever risk not hearing communication directed to them specifically, from traffic controllers?
How do we improve the relationship with a client software team that performs poorly and is becoming less collaborative?
"which" command doesn't work / path of Safari?
Why are only specific transaction types accepted into the mempool?
How to type dʒ symbol (IPA) on Mac?
Set-theoretical foundations of Mathematics with only bounded quantifiers
Updating all bands of PostGIS raster in one function (like st_setvalues) with one geomval[] set?
Modeling data in PostGIS when Several Join queries with Geometry are NeededMoving PostGIS database for Social Media to Cassandra?Neighbors within distance from every rowPostGIS - raster and bandsPerforming raster calculations with more than two bands in PostGIS?Significant performance issues with PostGIS UnaryUnionOptimizing PostGIS/Geoserver schema for huge datasetGet ST_SummaryStats from Raster Table using geoJSON polygonOptimal Voxel Database Schema in PostGISWhy is creating features with FALSE boolean fields in QGIS and Postgres failing when the fields have default values?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I have ~700 raster tables in postgres. Some have an expanse the size of California. All the tables are tiled and share tile IDs.
Given a geomval set, I need to make updates to each table. Here, I currently make use of st_setvalues (specifically variant 5), but I have to loop through each table to make those changes.
To speed this process (which can be quite slow, depending on the size of the geomval set), I'm thinking of making these individual tables as bands in one single table.
Does there exist a way to quickly update all bands at once so that I don't have to run the spatial intersection multiple times?
Currently, st_setvalues only operates on a one band at a time.
postgis raster multi-band
bumped to the homepage by Community♦ 22 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have ~700 raster tables in postgres. Some have an expanse the size of California. All the tables are tiled and share tile IDs.
Given a geomval set, I need to make updates to each table. Here, I currently make use of st_setvalues (specifically variant 5), but I have to loop through each table to make those changes.
To speed this process (which can be quite slow, depending on the size of the geomval set), I'm thinking of making these individual tables as bands in one single table.
Does there exist a way to quickly update all bands at once so that I don't have to run the spatial intersection multiple times?
Currently, st_setvalues only operates on a one band at a time.
postgis raster multi-band
bumped to the homepage by Community♦ 22 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
I guess you will have to write your own variant of St_SetValues()...
– Pierre Racine
Apr 18 '17 at 13:04
@Pierre, can you put that as an answer and expand a bit on why. You are someone who knows a lot about PostGis raster capabilities and it can be hard to find information, which is a shame, as it is very powerful
– John Powell
Apr 18 '17 at 16:51
Very good/useful question.
– John Powell
Apr 18 '17 at 16:52
add a comment |
I have ~700 raster tables in postgres. Some have an expanse the size of California. All the tables are tiled and share tile IDs.
Given a geomval set, I need to make updates to each table. Here, I currently make use of st_setvalues (specifically variant 5), but I have to loop through each table to make those changes.
To speed this process (which can be quite slow, depending on the size of the geomval set), I'm thinking of making these individual tables as bands in one single table.
Does there exist a way to quickly update all bands at once so that I don't have to run the spatial intersection multiple times?
Currently, st_setvalues only operates on a one band at a time.
postgis raster multi-band
I have ~700 raster tables in postgres. Some have an expanse the size of California. All the tables are tiled and share tile IDs.
Given a geomval set, I need to make updates to each table. Here, I currently make use of st_setvalues (specifically variant 5), but I have to loop through each table to make those changes.
To speed this process (which can be quite slow, depending on the size of the geomval set), I'm thinking of making these individual tables as bands in one single table.
Does there exist a way to quickly update all bands at once so that I don't have to run the spatial intersection multiple times?
Currently, st_setvalues only operates on a one band at a time.
postgis raster multi-band
postgis raster multi-band
edited Apr 14 '17 at 21:02
PolyGeo♦
53.9k1781245
53.9k1781245
asked Apr 14 '17 at 20:42
Koshy ThomasKoshy Thomas
1417
1417
bumped to the homepage by Community♦ 22 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 22 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
I guess you will have to write your own variant of St_SetValues()...
– Pierre Racine
Apr 18 '17 at 13:04
@Pierre, can you put that as an answer and expand a bit on why. You are someone who knows a lot about PostGis raster capabilities and it can be hard to find information, which is a shame, as it is very powerful
– John Powell
Apr 18 '17 at 16:51
Very good/useful question.
– John Powell
Apr 18 '17 at 16:52
add a comment |
I guess you will have to write your own variant of St_SetValues()...
– Pierre Racine
Apr 18 '17 at 13:04
@Pierre, can you put that as an answer and expand a bit on why. You are someone who knows a lot about PostGis raster capabilities and it can be hard to find information, which is a shame, as it is very powerful
– John Powell
Apr 18 '17 at 16:51
Very good/useful question.
– John Powell
Apr 18 '17 at 16:52
I guess you will have to write your own variant of St_SetValues()...
– Pierre Racine
Apr 18 '17 at 13:04
I guess you will have to write your own variant of St_SetValues()...
– Pierre Racine
Apr 18 '17 at 13:04
@Pierre, can you put that as an answer and expand a bit on why. You are someone who knows a lot about PostGis raster capabilities and it can be hard to find information, which is a shame, as it is very powerful
– John Powell
Apr 18 '17 at 16:51
@Pierre, can you put that as an answer and expand a bit on why. You are someone who knows a lot about PostGis raster capabilities and it can be hard to find information, which is a shame, as it is very powerful
– John Powell
Apr 18 '17 at 16:51
Very good/useful question.
– John Powell
Apr 18 '17 at 16:52
Very good/useful question.
– John Powell
Apr 18 '17 at 16:52
add a comment |
1 Answer
1
active
oldest
votes
You could write your own PL/pgSQL variant of ST_SetValues() taking an array of array of values (one array of values per band) instead of a band number. The function would iterate over the bands, using the single band ST_SetValues() functions to set the values. You would end up with 4 variants corresponding to the 4 ST_SetValues() functions taking a band number.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "79"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f236910%2fupdating-all-bands-of-postgis-raster-in-one-function-like-st-setvalues-with-on%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You could write your own PL/pgSQL variant of ST_SetValues() taking an array of array of values (one array of values per band) instead of a band number. The function would iterate over the bands, using the single band ST_SetValues() functions to set the values. You would end up with 4 variants corresponding to the 4 ST_SetValues() functions taking a band number.
add a comment |
You could write your own PL/pgSQL variant of ST_SetValues() taking an array of array of values (one array of values per band) instead of a band number. The function would iterate over the bands, using the single band ST_SetValues() functions to set the values. You would end up with 4 variants corresponding to the 4 ST_SetValues() functions taking a band number.
add a comment |
You could write your own PL/pgSQL variant of ST_SetValues() taking an array of array of values (one array of values per band) instead of a band number. The function would iterate over the bands, using the single band ST_SetValues() functions to set the values. You would end up with 4 variants corresponding to the 4 ST_SetValues() functions taking a band number.
You could write your own PL/pgSQL variant of ST_SetValues() taking an array of array of values (one array of values per band) instead of a band number. The function would iterate over the bands, using the single band ST_SetValues() functions to set the values. You would end up with 4 variants corresponding to the 4 ST_SetValues() functions taking a band number.
answered Apr 18 '17 at 20:43
Pierre RacinePierre Racine
1,49698
1,49698
add a comment |
add a comment |
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f236910%2fupdating-all-bands-of-postgis-raster-in-one-function-like-st-setvalues-with-on%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I guess you will have to write your own variant of St_SetValues()...
– Pierre Racine
Apr 18 '17 at 13:04
@Pierre, can you put that as an answer and expand a bit on why. You are someone who knows a lot about PostGis raster capabilities and it can be hard to find information, which is a shame, as it is very powerful
– John Powell
Apr 18 '17 at 16:51
Very good/useful question.
– John Powell
Apr 18 '17 at 16:52