How calculate area after intersect 2 polygons in POSTGIS
When Schnorr signatures are part of Bitcoin will it be possible validate each block with only one signature validation?
Why is a very small peak with larger m/z not considered to be the molecular ion?
In the late 1940’s to early 1950’s what technology was available that could melt ice?
Does "Until when" sound natural for native speakers?
What sort of fish is this
Is it safe to abruptly remove Arduino power?
Making a kiddush for a girl that has hard time finding shidduch
Why do we say ‘pairwise disjoint’, rather than ‘disjoint’?
How to resolve: Reviewer #1 says remove section X vs. Reviewer #2 says expand section X
What's the 'present simple' form of the word "нашла́" in 3rd person singular female?
What do *foreign films* mean for an American?
Having the player face themselves after the mid-game
Are all players supposed to be able to see each others' character sheets?
After `ssh` without `-X` to a machine, is it possible to change `$DISPLAY` to make it work like `ssh -X`?
QQ Plot and Shapiro Wilk Test Disagree
Do cubics always have one real root?
Why couldn't the separatists legally leave the Republic?
What is better: yes / no radio, or simple checkbox?
Do I really need to have a scientific explanation for my premise?
Recommendation letter by significant other if you worked with them professionally?
I reported the illegal activity of my boss to his boss. My boss found out. Now I am being punished. What should I do?
What is the generally accepted pronunciation of “topoi”?
From an axiomatic set theoric approach why can we take uncountable unions?
Was it really inappropriate to write a pull request for the company I interviewed with?
How calculate area after intersect 2 polygons in POSTGIS
I successful have intersected two polygons using ST_INTERSECTION.
polygon1: amenaza (target, I got the fields amenazas and zona)
polygon2: temporal (is used only to intersect)
SELECT A.amenazas As AMENAZA, A.zona As ZONA,
ST_COLLECT(ST_INTERSECTION(A.geom, ST_Transform(B.geom, 21897)))
FROM ingeominas_amenaza As A ,temporal As B
WHERE ST_Intersects(A.geom, ST_Transform(B.geom, 21897))
GROUP BY AMENAZA,ZONA;

I want to add a new column area (hectares) in the same table, how can I calculate the area after intersect 2 polygons in POSTGIS ?
I had tried the next code, but is showing only 2 fields (AMENAZA , ZONA):
SELECT A.amenazas As AMENAZA, A.zona As ZONA, ST_Area(ST_INTERSECTION(A.geom, ST_Transform(B.geom, 21897))) As sqm,
ST_COLLECT(ST_INTERSECTION(A.geom, ST_Transform(B.geom, 21897)))
FROM ingeominas_amenaza As A ,temporal As B
WHERE ST_Intersects(A.geom, ST_Transform(B.geom, 21897))
GROUP BY AMENAZA,ZONA,sqm;

postgis
add a comment |
I successful have intersected two polygons using ST_INTERSECTION.
polygon1: amenaza (target, I got the fields amenazas and zona)
polygon2: temporal (is used only to intersect)
SELECT A.amenazas As AMENAZA, A.zona As ZONA,
ST_COLLECT(ST_INTERSECTION(A.geom, ST_Transform(B.geom, 21897)))
FROM ingeominas_amenaza As A ,temporal As B
WHERE ST_Intersects(A.geom, ST_Transform(B.geom, 21897))
GROUP BY AMENAZA,ZONA;

I want to add a new column area (hectares) in the same table, how can I calculate the area after intersect 2 polygons in POSTGIS ?
I had tried the next code, but is showing only 2 fields (AMENAZA , ZONA):
SELECT A.amenazas As AMENAZA, A.zona As ZONA, ST_Area(ST_INTERSECTION(A.geom, ST_Transform(B.geom, 21897))) As sqm,
ST_COLLECT(ST_INTERSECTION(A.geom, ST_Transform(B.geom, 21897)))
FROM ingeominas_amenaza As A ,temporal As B
WHERE ST_Intersects(A.geom, ST_Transform(B.geom, 21897))
GROUP BY AMENAZA,ZONA,sqm;

postgis
add a comment |
I successful have intersected two polygons using ST_INTERSECTION.
polygon1: amenaza (target, I got the fields amenazas and zona)
polygon2: temporal (is used only to intersect)
SELECT A.amenazas As AMENAZA, A.zona As ZONA,
ST_COLLECT(ST_INTERSECTION(A.geom, ST_Transform(B.geom, 21897)))
FROM ingeominas_amenaza As A ,temporal As B
WHERE ST_Intersects(A.geom, ST_Transform(B.geom, 21897))
GROUP BY AMENAZA,ZONA;

I want to add a new column area (hectares) in the same table, how can I calculate the area after intersect 2 polygons in POSTGIS ?
I had tried the next code, but is showing only 2 fields (AMENAZA , ZONA):
SELECT A.amenazas As AMENAZA, A.zona As ZONA, ST_Area(ST_INTERSECTION(A.geom, ST_Transform(B.geom, 21897))) As sqm,
ST_COLLECT(ST_INTERSECTION(A.geom, ST_Transform(B.geom, 21897)))
FROM ingeominas_amenaza As A ,temporal As B
WHERE ST_Intersects(A.geom, ST_Transform(B.geom, 21897))
GROUP BY AMENAZA,ZONA,sqm;

postgis
I successful have intersected two polygons using ST_INTERSECTION.
polygon1: amenaza (target, I got the fields amenazas and zona)
polygon2: temporal (is used only to intersect)
SELECT A.amenazas As AMENAZA, A.zona As ZONA,
ST_COLLECT(ST_INTERSECTION(A.geom, ST_Transform(B.geom, 21897)))
FROM ingeominas_amenaza As A ,temporal As B
WHERE ST_Intersects(A.geom, ST_Transform(B.geom, 21897))
GROUP BY AMENAZA,ZONA;

I want to add a new column area (hectares) in the same table, how can I calculate the area after intersect 2 polygons in POSTGIS ?
I had tried the next code, but is showing only 2 fields (AMENAZA , ZONA):
SELECT A.amenazas As AMENAZA, A.zona As ZONA, ST_Area(ST_INTERSECTION(A.geom, ST_Transform(B.geom, 21897))) As sqm,
ST_COLLECT(ST_INTERSECTION(A.geom, ST_Transform(B.geom, 21897)))
FROM ingeominas_amenaza As A ,temporal As B
WHERE ST_Intersects(A.geom, ST_Transform(B.geom, 21897))
GROUP BY AMENAZA,ZONA,sqm;

postgis
postgis
asked 51 secs ago
PAUL GOYESPAUL GOYES
264
264
add a comment |
add a comment |
0
active
oldest
votes
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%2f315011%2fhow-calculate-area-after-intersect-2-polygons-in-postgis%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f315011%2fhow-calculate-area-after-intersect-2-polygons-in-postgis%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