Drawing polygons with holes on map using vertices exported from QGIS? Planned maintenance...
Can the Haste spell grant both a Beast Master ranger and their animal companion extra attacks?
How does TikZ render an arc?
What does 丫 mean? 丫是什么意思?
Did pre-Columbian Americans know the spherical shape of the Earth?
Why did Bronn offer to be Tyrion Lannister's champion in trial by combat?
My mentor says to set image to Fine instead of RAW — how is this different from JPG?
Flight departed from the gate 5 min before scheduled departure time. Refund options
Twin's vs. Twins'
Marquee sign letters
NIntegrate on a solution of a matrix ODE
As a dual citizen, my US passport will expire one day after traveling to the US. Will this work?
Short story about astronauts fertilizing soil with their own bodies
Is the Mordenkainen's Sword spell underpowered?
Where did Ptolemy compare the Earth to the distance of fixed stars?
What is a more techy Technical Writer job title that isn't cutesy or confusing?
Can two people see the same photon?
Found this skink in my tomato plant bucket. Is he trapped? Or could he leave if he wanted?
How do I say "this must not happen"?
Sally's older brother
Where and when has Thucydides been studied?
Are there any irrational/transcendental numbers for which the distribution of decimal digits is not uniform?
Diophantine equation 3^a+1=3^b+5^c
Is the time—manner—place ordering of adverbials an oversimplification?
3D Masyu - A Die
Drawing polygons with holes on map using vertices exported from QGIS?
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Why are GeoJSON coordinates different exported from QGIS vs. ogr2ogr?Split a polygon layer with a line layer?Sort polygons from north to south in QGIS using 'graphical modeler'?How to clean up a polygon by removing vertices and lines within?Drawing polygons with holes in QGIS?sf lines to polygons with holesHow to delete from mutipolygons all but the biggest polygon in QGISMake holes in a polygon from existing smaller polygonsExtracting vertices in line segments using ArcGIS Desktop?Convert polygons to lines ignoring redundant vertices in QGIS
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I have exported from QGIS, for a feature in a layer, all the vertices (lat and lon) of a polygon, into a file. I'm trying now to draw that polygon using that list of vertices (that I re-read from the file), on a map on a web site but that polygon has one or more holes. So far I have been able to draw the polygon but I have issues drawing the "holes" in it. I'm working on a PoC and this is the the biggest issue met so far.
How should I handle the list of vertices from my page in order to be able to draw the polygon... and the holes as well ?
Looking at the list of vertices I can see that the initial pair of coordinate is repeated after some other vertices. This means the polygon gets closed in that point. All the other vertices coming in my list after the polygon closes, to me are holes, so as many other arrays as the holes that are in the polygon, that is so actually the first list of vertices in the list.
qgis polygon export vertices holes
add a comment |
I have exported from QGIS, for a feature in a layer, all the vertices (lat and lon) of a polygon, into a file. I'm trying now to draw that polygon using that list of vertices (that I re-read from the file), on a map on a web site but that polygon has one or more holes. So far I have been able to draw the polygon but I have issues drawing the "holes" in it. I'm working on a PoC and this is the the biggest issue met so far.
How should I handle the list of vertices from my page in order to be able to draw the polygon... and the holes as well ?
Looking at the list of vertices I can see that the initial pair of coordinate is repeated after some other vertices. This means the polygon gets closed in that point. All the other vertices coming in my list after the polygon closes, to me are holes, so as many other arrays as the holes that are in the polygon, that is so actually the first list of vertices in the list.
qgis polygon export vertices holes
Answer for Google(r) Maps: developers.google.com/maps/documentation/javascript/…
– caramelleas
Jul 24 '18 at 15:11
Don't forget to take the Tour to learn about our focussed Q&A format.
– PolyGeo♦
Jul 24 '18 at 21:37
add a comment |
I have exported from QGIS, for a feature in a layer, all the vertices (lat and lon) of a polygon, into a file. I'm trying now to draw that polygon using that list of vertices (that I re-read from the file), on a map on a web site but that polygon has one or more holes. So far I have been able to draw the polygon but I have issues drawing the "holes" in it. I'm working on a PoC and this is the the biggest issue met so far.
How should I handle the list of vertices from my page in order to be able to draw the polygon... and the holes as well ?
Looking at the list of vertices I can see that the initial pair of coordinate is repeated after some other vertices. This means the polygon gets closed in that point. All the other vertices coming in my list after the polygon closes, to me are holes, so as many other arrays as the holes that are in the polygon, that is so actually the first list of vertices in the list.
qgis polygon export vertices holes
I have exported from QGIS, for a feature in a layer, all the vertices (lat and lon) of a polygon, into a file. I'm trying now to draw that polygon using that list of vertices (that I re-read from the file), on a map on a web site but that polygon has one or more holes. So far I have been able to draw the polygon but I have issues drawing the "holes" in it. I'm working on a PoC and this is the the biggest issue met so far.
How should I handle the list of vertices from my page in order to be able to draw the polygon... and the holes as well ?
Looking at the list of vertices I can see that the initial pair of coordinate is repeated after some other vertices. This means the polygon gets closed in that point. All the other vertices coming in my list after the polygon closes, to me are holes, so as many other arrays as the holes that are in the polygon, that is so actually the first list of vertices in the list.
qgis polygon export vertices holes
qgis polygon export vertices holes
edited Jul 24 '18 at 21:35
PolyGeo♦
54.1k1782246
54.1k1782246
asked Jul 24 '18 at 12:35
caramelleascaramelleas
286
286
Answer for Google(r) Maps: developers.google.com/maps/documentation/javascript/…
– caramelleas
Jul 24 '18 at 15:11
Don't forget to take the Tour to learn about our focussed Q&A format.
– PolyGeo♦
Jul 24 '18 at 21:37
add a comment |
Answer for Google(r) Maps: developers.google.com/maps/documentation/javascript/…
– caramelleas
Jul 24 '18 at 15:11
Don't forget to take the Tour to learn about our focussed Q&A format.
– PolyGeo♦
Jul 24 '18 at 21:37
Answer for Google(r) Maps: developers.google.com/maps/documentation/javascript/…
– caramelleas
Jul 24 '18 at 15:11
Answer for Google(r) Maps: developers.google.com/maps/documentation/javascript/…
– caramelleas
Jul 24 '18 at 15:11
Don't forget to take the Tour to learn about our focussed Q&A format.
– PolyGeo♦
Jul 24 '18 at 21:37
Don't forget to take the Tour to learn about our focussed Q&A format.
– PolyGeo♦
Jul 24 '18 at 21:37
add a comment |
1 Answer
1
active
oldest
votes
After creating a couple of samples, I could get how the vertices list works:
Polygons are stored in a clockwise fashion except for interior polygon hole parts (i.e. 'donut holes'), which are stored in a counter-clockwise fashion. In fact, that's how polygon holes are recognized.
I did two tests following this principle: a polygon with 3 holes and a multi part poligon. In both cases this is a standard and corresponds to how vertices are returned.
As far as map polygon/holes drawing, I think there may be an API to do this, able to recognize how a list of coordinates rotates: if it is counterclockwise (= hole) or clockwise (part of a polygon).
This may be of some help for the map visualization of polygons stackoverflow.com/questions/14505565/…
– caramelleas
Jul 27 '18 at 14:27
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%2f290479%2fdrawing-polygons-with-holes-on-map-using-vertices-exported-from-qgis%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
After creating a couple of samples, I could get how the vertices list works:
Polygons are stored in a clockwise fashion except for interior polygon hole parts (i.e. 'donut holes'), which are stored in a counter-clockwise fashion. In fact, that's how polygon holes are recognized.
I did two tests following this principle: a polygon with 3 holes and a multi part poligon. In both cases this is a standard and corresponds to how vertices are returned.
As far as map polygon/holes drawing, I think there may be an API to do this, able to recognize how a list of coordinates rotates: if it is counterclockwise (= hole) or clockwise (part of a polygon).
This may be of some help for the map visualization of polygons stackoverflow.com/questions/14505565/…
– caramelleas
Jul 27 '18 at 14:27
add a comment |
After creating a couple of samples, I could get how the vertices list works:
Polygons are stored in a clockwise fashion except for interior polygon hole parts (i.e. 'donut holes'), which are stored in a counter-clockwise fashion. In fact, that's how polygon holes are recognized.
I did two tests following this principle: a polygon with 3 holes and a multi part poligon. In both cases this is a standard and corresponds to how vertices are returned.
As far as map polygon/holes drawing, I think there may be an API to do this, able to recognize how a list of coordinates rotates: if it is counterclockwise (= hole) or clockwise (part of a polygon).
This may be of some help for the map visualization of polygons stackoverflow.com/questions/14505565/…
– caramelleas
Jul 27 '18 at 14:27
add a comment |
After creating a couple of samples, I could get how the vertices list works:
Polygons are stored in a clockwise fashion except for interior polygon hole parts (i.e. 'donut holes'), which are stored in a counter-clockwise fashion. In fact, that's how polygon holes are recognized.
I did two tests following this principle: a polygon with 3 holes and a multi part poligon. In both cases this is a standard and corresponds to how vertices are returned.
As far as map polygon/holes drawing, I think there may be an API to do this, able to recognize how a list of coordinates rotates: if it is counterclockwise (= hole) or clockwise (part of a polygon).
After creating a couple of samples, I could get how the vertices list works:
Polygons are stored in a clockwise fashion except for interior polygon hole parts (i.e. 'donut holes'), which are stored in a counter-clockwise fashion. In fact, that's how polygon holes are recognized.
I did two tests following this principle: a polygon with 3 holes and a multi part poligon. In both cases this is a standard and corresponds to how vertices are returned.
As far as map polygon/holes drawing, I think there may be an API to do this, able to recognize how a list of coordinates rotates: if it is counterclockwise (= hole) or clockwise (part of a polygon).
edited 33 mins ago
PolyGeo♦
54.1k1782246
54.1k1782246
answered Jul 26 '18 at 22:55
caramelleascaramelleas
286
286
This may be of some help for the map visualization of polygons stackoverflow.com/questions/14505565/…
– caramelleas
Jul 27 '18 at 14:27
add a comment |
This may be of some help for the map visualization of polygons stackoverflow.com/questions/14505565/…
– caramelleas
Jul 27 '18 at 14:27
This may be of some help for the map visualization of polygons stackoverflow.com/questions/14505565/…
– caramelleas
Jul 27 '18 at 14:27
This may be of some help for the map visualization of polygons stackoverflow.com/questions/14505565/…
– caramelleas
Jul 27 '18 at 14:27
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%2f290479%2fdrawing-polygons-with-holes-on-map-using-vertices-exported-from-qgis%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
Answer for Google(r) Maps: developers.google.com/maps/documentation/javascript/…
– caramelleas
Jul 24 '18 at 15:11
Don't forget to take the Tour to learn about our focussed Q&A format.
– PolyGeo♦
Jul 24 '18 at 21:37