QGIS custom grid / line oriented point displacement?











up vote
4
down vote

favorite
1












I am trying to sort point symbols at the same coordinates in a line. The first picture shows how I want it to be (all symbols in a single horizontal line), the second how it looks with the standard grid-based point displacement (multiple, unwanted rows of symbols, and therefor also an unwanted overlap of text and symbols).



Is there any way/plugin to either change the parameters of how the grid is built (number of rows/lines) or any other way to show symbols in a line?



I am not hugely into scripting or programming though.



enter image description here



enter image description here










share|improve this question









New contributor




Tyak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Welcome to GIS.SE, Tyak! Please keep in mind, that from a cartographical point of view this display of information is not desirable, since the exact location of the ruins can not be determined.
    – Erik
    2 days ago










  • I agree that this is not an exact map, but since most of the stuff I am showing is only known from literature anyways I don't think that it'd matter much. Also: You gotta do what the boss wants you to do, so...^^
    – Tyak
    2 days ago












  • Sometimes telling your boss, that their ideas are bollocks, is the better solution ;-) could you tell some more about your data? Are the ruins all in one shape file? Are they separate points for each location, or do you have one point per city/site and then attributes?
    – Erik
    2 days ago












  • they are all different points with the same coordinates on the same shape file.
    – Tyak
    2 days ago










  • I could put them into single points with attributes too if that woud help...
    – Tyak
    2 days ago















up vote
4
down vote

favorite
1












I am trying to sort point symbols at the same coordinates in a line. The first picture shows how I want it to be (all symbols in a single horizontal line), the second how it looks with the standard grid-based point displacement (multiple, unwanted rows of symbols, and therefor also an unwanted overlap of text and symbols).



Is there any way/plugin to either change the parameters of how the grid is built (number of rows/lines) or any other way to show symbols in a line?



I am not hugely into scripting or programming though.



enter image description here



enter image description here










share|improve this question









New contributor




Tyak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Welcome to GIS.SE, Tyak! Please keep in mind, that from a cartographical point of view this display of information is not desirable, since the exact location of the ruins can not be determined.
    – Erik
    2 days ago










  • I agree that this is not an exact map, but since most of the stuff I am showing is only known from literature anyways I don't think that it'd matter much. Also: You gotta do what the boss wants you to do, so...^^
    – Tyak
    2 days ago












  • Sometimes telling your boss, that their ideas are bollocks, is the better solution ;-) could you tell some more about your data? Are the ruins all in one shape file? Are they separate points for each location, or do you have one point per city/site and then attributes?
    – Erik
    2 days ago












  • they are all different points with the same coordinates on the same shape file.
    – Tyak
    2 days ago










  • I could put them into single points with attributes too if that woud help...
    – Tyak
    2 days ago













up vote
4
down vote

favorite
1









up vote
4
down vote

favorite
1






1





I am trying to sort point symbols at the same coordinates in a line. The first picture shows how I want it to be (all symbols in a single horizontal line), the second how it looks with the standard grid-based point displacement (multiple, unwanted rows of symbols, and therefor also an unwanted overlap of text and symbols).



Is there any way/plugin to either change the parameters of how the grid is built (number of rows/lines) or any other way to show symbols in a line?



I am not hugely into scripting or programming though.



enter image description here



enter image description here










share|improve this question









New contributor




Tyak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I am trying to sort point symbols at the same coordinates in a line. The first picture shows how I want it to be (all symbols in a single horizontal line), the second how it looks with the standard grid-based point displacement (multiple, unwanted rows of symbols, and therefor also an unwanted overlap of text and symbols).



Is there any way/plugin to either change the parameters of how the grid is built (number of rows/lines) or any other way to show symbols in a line?



I am not hugely into scripting or programming though.



enter image description here



enter image description here







qgis






share|improve this question









New contributor




Tyak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Tyak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 2 days ago









PolyGeo

52.8k1779236




52.8k1779236






New contributor




Tyak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









Tyak

211




211




New contributor




Tyak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Tyak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Tyak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Welcome to GIS.SE, Tyak! Please keep in mind, that from a cartographical point of view this display of information is not desirable, since the exact location of the ruins can not be determined.
    – Erik
    2 days ago










  • I agree that this is not an exact map, but since most of the stuff I am showing is only known from literature anyways I don't think that it'd matter much. Also: You gotta do what the boss wants you to do, so...^^
    – Tyak
    2 days ago












  • Sometimes telling your boss, that their ideas are bollocks, is the better solution ;-) could you tell some more about your data? Are the ruins all in one shape file? Are they separate points for each location, or do you have one point per city/site and then attributes?
    – Erik
    2 days ago












  • they are all different points with the same coordinates on the same shape file.
    – Tyak
    2 days ago










  • I could put them into single points with attributes too if that woud help...
    – Tyak
    2 days ago


















  • Welcome to GIS.SE, Tyak! Please keep in mind, that from a cartographical point of view this display of information is not desirable, since the exact location of the ruins can not be determined.
    – Erik
    2 days ago










  • I agree that this is not an exact map, but since most of the stuff I am showing is only known from literature anyways I don't think that it'd matter much. Also: You gotta do what the boss wants you to do, so...^^
    – Tyak
    2 days ago












  • Sometimes telling your boss, that their ideas are bollocks, is the better solution ;-) could you tell some more about your data? Are the ruins all in one shape file? Are they separate points for each location, or do you have one point per city/site and then attributes?
    – Erik
    2 days ago












  • they are all different points with the same coordinates on the same shape file.
    – Tyak
    2 days ago










  • I could put them into single points with attributes too if that woud help...
    – Tyak
    2 days ago
















Welcome to GIS.SE, Tyak! Please keep in mind, that from a cartographical point of view this display of information is not desirable, since the exact location of the ruins can not be determined.
– Erik
2 days ago




Welcome to GIS.SE, Tyak! Please keep in mind, that from a cartographical point of view this display of information is not desirable, since the exact location of the ruins can not be determined.
– Erik
2 days ago












I agree that this is not an exact map, but since most of the stuff I am showing is only known from literature anyways I don't think that it'd matter much. Also: You gotta do what the boss wants you to do, so...^^
– Tyak
2 days ago






I agree that this is not an exact map, but since most of the stuff I am showing is only known from literature anyways I don't think that it'd matter much. Also: You gotta do what the boss wants you to do, so...^^
– Tyak
2 days ago














Sometimes telling your boss, that their ideas are bollocks, is the better solution ;-) could you tell some more about your data? Are the ruins all in one shape file? Are they separate points for each location, or do you have one point per city/site and then attributes?
– Erik
2 days ago






Sometimes telling your boss, that their ideas are bollocks, is the better solution ;-) could you tell some more about your data? Are the ruins all in one shape file? Are they separate points for each location, or do you have one point per city/site and then attributes?
– Erik
2 days ago














they are all different points with the same coordinates on the same shape file.
– Tyak
2 days ago




they are all different points with the same coordinates on the same shape file.
– Tyak
2 days ago












I could put them into single points with attributes too if that woud help...
– Tyak
2 days ago




I could put them into single points with attributes too if that woud help...
– Tyak
2 days ago










1 Answer
1






active

oldest

votes

















up vote
3
down vote













I would calculate offset distance (dx) for each feature, so that I can position them by (x, y) = ($x+dx, $y).



enter image description here



An example of expression to calculate dx is:



with_variable('my_array', array_agg("symbols", group_by:="geom_to_wkt($geometry)"), 
5 *(array_find(@my_array, "symbols") - floor(array_length(@my_array)/2)))



  • You will need to modify "symbols" according to your attribute field which defines your categorized symbols.

  • The second line has a factor 5, but it is arbitrary. Please adjust this number by visually checking your output.






share|improve this answer





















  • But wouldn't that give every symbol a fixed position? Wouldn't that result in gaps between symbols if some weren't there at a location?
    – Tyak
    2 days ago






  • 1




    @Tyak the array_length part counts the number of your symbols and array_find checks its position in the array. If you have many symbols the array is extended.
    – Kazuhito
    2 days ago











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',
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
});


}
});






Tyak is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f303693%2fqgis-custom-grid-line-oriented-point-displacement%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








up vote
3
down vote













I would calculate offset distance (dx) for each feature, so that I can position them by (x, y) = ($x+dx, $y).



enter image description here



An example of expression to calculate dx is:



with_variable('my_array', array_agg("symbols", group_by:="geom_to_wkt($geometry)"), 
5 *(array_find(@my_array, "symbols") - floor(array_length(@my_array)/2)))



  • You will need to modify "symbols" according to your attribute field which defines your categorized symbols.

  • The second line has a factor 5, but it is arbitrary. Please adjust this number by visually checking your output.






share|improve this answer





















  • But wouldn't that give every symbol a fixed position? Wouldn't that result in gaps between symbols if some weren't there at a location?
    – Tyak
    2 days ago






  • 1




    @Tyak the array_length part counts the number of your symbols and array_find checks its position in the array. If you have many symbols the array is extended.
    – Kazuhito
    2 days ago















up vote
3
down vote













I would calculate offset distance (dx) for each feature, so that I can position them by (x, y) = ($x+dx, $y).



enter image description here



An example of expression to calculate dx is:



with_variable('my_array', array_agg("symbols", group_by:="geom_to_wkt($geometry)"), 
5 *(array_find(@my_array, "symbols") - floor(array_length(@my_array)/2)))



  • You will need to modify "symbols" according to your attribute field which defines your categorized symbols.

  • The second line has a factor 5, but it is arbitrary. Please adjust this number by visually checking your output.






share|improve this answer





















  • But wouldn't that give every symbol a fixed position? Wouldn't that result in gaps between symbols if some weren't there at a location?
    – Tyak
    2 days ago






  • 1




    @Tyak the array_length part counts the number of your symbols and array_find checks its position in the array. If you have many symbols the array is extended.
    – Kazuhito
    2 days ago













up vote
3
down vote










up vote
3
down vote









I would calculate offset distance (dx) for each feature, so that I can position them by (x, y) = ($x+dx, $y).



enter image description here



An example of expression to calculate dx is:



with_variable('my_array', array_agg("symbols", group_by:="geom_to_wkt($geometry)"), 
5 *(array_find(@my_array, "symbols") - floor(array_length(@my_array)/2)))



  • You will need to modify "symbols" according to your attribute field which defines your categorized symbols.

  • The second line has a factor 5, but it is arbitrary. Please adjust this number by visually checking your output.






share|improve this answer












I would calculate offset distance (dx) for each feature, so that I can position them by (x, y) = ($x+dx, $y).



enter image description here



An example of expression to calculate dx is:



with_variable('my_array', array_agg("symbols", group_by:="geom_to_wkt($geometry)"), 
5 *(array_find(@my_array, "symbols") - floor(array_length(@my_array)/2)))



  • You will need to modify "symbols" according to your attribute field which defines your categorized symbols.

  • The second line has a factor 5, but it is arbitrary. Please adjust this number by visually checking your output.







share|improve this answer












share|improve this answer



share|improve this answer










answered 2 days ago









Kazuhito

13.7k31576




13.7k31576












  • But wouldn't that give every symbol a fixed position? Wouldn't that result in gaps between symbols if some weren't there at a location?
    – Tyak
    2 days ago






  • 1




    @Tyak the array_length part counts the number of your symbols and array_find checks its position in the array. If you have many symbols the array is extended.
    – Kazuhito
    2 days ago


















  • But wouldn't that give every symbol a fixed position? Wouldn't that result in gaps between symbols if some weren't there at a location?
    – Tyak
    2 days ago






  • 1




    @Tyak the array_length part counts the number of your symbols and array_find checks its position in the array. If you have many symbols the array is extended.
    – Kazuhito
    2 days ago
















But wouldn't that give every symbol a fixed position? Wouldn't that result in gaps between symbols if some weren't there at a location?
– Tyak
2 days ago




But wouldn't that give every symbol a fixed position? Wouldn't that result in gaps between symbols if some weren't there at a location?
– Tyak
2 days ago




1




1




@Tyak the array_length part counts the number of your symbols and array_find checks its position in the array. If you have many symbols the array is extended.
– Kazuhito
2 days ago




@Tyak the array_length part counts the number of your symbols and array_find checks its position in the array. If you have many symbols the array is extended.
– Kazuhito
2 days ago










Tyak is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















Tyak is a new contributor. Be nice, and check out our Code of Conduct.













Tyak is a new contributor. Be nice, and check out our Code of Conduct.












Tyak is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f303693%2fqgis-custom-grid-line-oriented-point-displacement%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

If I really need a card on my start hand, how many mulligans make sense? [duplicate]

Alcedinidae

Can an atomic nucleus contain both particles and antiparticles? [duplicate]