• Aucun résultat trouvé

Symbology Encoding Using CartoCSS to Support Complex Symbols

N/A
N/A
Protected

Academic year: 2022

Partager "Symbology Encoding Using CartoCSS to Support Complex Symbols"

Copied!
4
0
0

Texte intégral

(1)

Spatial Knowledge and Information Canada, 2019, 7(6), 5

Symbology Encoding Using CartoCSS to Support Complex Symbols

SOROUSH OJAGH Geomatics Engineering University of Calgary Soroush.ojagh@ucalgary.ca

SARA SAEEDI Geomatics

Engineering

University of Calgary ssaeedi@ucalgary.ca

JAMES BADGER Geomatics Engineering

University of Calgary jpbadger@ucalgary.ca

STEVE LIANG

Geomatics Engineering University of Calgary Steve.liang@ucalgary.ca

ABSTRACT

Spatial analysts and decision makers are in growing need of interacting with maps as a visualization method of representing spatial information. CartoCSS is a style encoding which allows high-level of customization for cartographic aspects of a map. In this paper, we look at CartoCSS encoding as a styling option to render complex symbols. We also review its functionality in different environments including web, mobile, and desktop computers.

1. Introduction

Geospatial data inherently contains location-related digital information. Styling geospatial data and using symbols can be considered as the only way of portraying geospatial data as a map (Guo, Long, & Ji).

Various map makers are using different symbols and terminologies for the same feature. The Semantic Portrayal Ontology has been developed to increase the reusability of portrayal information between different map makers (Huang, Mansourian,

& Harrie, 2017).

Customizing the cartographic aspects of a map especially for composite symbols based on Semantic Portrayal Ontology developed by Open Geospatial Consortium (OGC) Testbed 13 (Fellah, 2017), is the primary focus of this article. Styling geospatial data is the only way to render data on a map.

Geoserver is one of the mostly common used open source map server (Mittlboeck &

Belgiu, 2018). It normally uses Styled Layer Descriptor (SLD) as a XML-based markup language to style geospatial data (Landeta, Vásquez, Rea, & García-Santillán, 2018).

However, it can use CSS-derived language extension to style geospatial data instead of SLD (Geoserver, 2018a). Styling composite symbols using SLD and CSS can be done by using defined geometry element of desired feature (Geoserver, 2018b). Based on our knowledge, styling composite symbols has not been studied and applied by using CartoCSS until now. In comparison to SLD, CartoCSS is more compact and easier to read and develop. So, we focused on using Kosmtik as an external tool to render styles developed by CartoCSS style encoding for composite symbols in this study. Rendering composite symbols such as bridges by using CartoCSS styling language is the main contribution of this study.

2. Methods and Data

We styled a map using data in Shapefile format that represents the Daara Refugee Camp. We created a representation using the result of applying CartoCSS encoding on Kosmtik (Orgs, 2017). Styling bridges as composite symbols with a different appearance at different zoom levels is the main outcome of this article. To achieve our goal, we present bridges as double border lines with angled lines at the start and end points of each bridge’s borderline. Bridges are defined by a single polyline in the middle of the street or road. In figure 1-a, the red dashed line is the bridge’s polyline in

(2)

2 Symbology Encoding Using CartoCSS to Support Complex Symbols

the Shapefile, but we have to present the bridge as the blue collection of lines (the desired symbol). By using SLD or CSS instead of CartoCSS, we can draw the angled lines and control their geometry by the predefined geometry element. However, in CartoCSS it would be a challenge because we cannot draw a new line and control its geometry. So, to address this challenge, we proposed an innovative method, and tried styling the bridge’s composite symbols through five steps illustrated in figure 1-b to 1-f. Actually, in the first step, two parallel polylines are drawn along the central polyline of bridge with an offset equal to the half of road width. Then, we used two sets of markers which are simple straight lines as the angled lines of bridge’s symbol. In the step 2, the first and last vertices of bridge’s polyline will be extracted first. Then, we placed created markers on the extracted first and last vertices of bridge’s polyline. It is worth mentioning that the central point of markers will be attached to the extracted vertices. In the third step, markers will be rotated based on the required angle, which is 45 degrees. Step four and five defined to translate and offset rotated markers to be placed on the first and last vertices of parallel polylines. This process is defined by showing the applied CartoCSS encodings in Figure 1.

Figure Description

a) Desired composite symbol for bridges: double border lines with angled lines at the start and end points of each bridge’s borderline

b) Step 1: Portray two parallel lines showing bridge’s border We used ::Background and

::Foreground ordering features

c) Step 2: Place two sets of markers in the first and last

vertex of bridge’s polyline marker- placement: vertex-first;

marker-placement:

vertex-last;

d) Step 3: Rotate markers Marke transform: rotate (-

45,0,0);

marker-transform: rotate (45,0,0);

e) Step 4: Translate markers marker-t transform: translate (-

2.5,0);

f) Step 5: Offset markers marker-offset: 8;

Figure 1: Styling bridges as composite symbols by CartoCSS styling language(Saeedi, 2018)

3. Results

We applied our methodology to style bridge composite symbols at different zoom levels.

Figure 2-a and 2-b show the similar result of applying CartoCSS styling language to style bridges viewed by Kosmtik in Google Chrome and Internet Explorer at zoom level 14. Styled bridges at zoom level 17 is shown in Figure 2-c. Figure 2-d depicts the same concept in Smartphone browser for zoom levels 18 and 19.

a) Styled bridges in Google Chrome version: 70. 0.3538.77 zoom level 14.

(3)

Symbology Encoding Using CartoCSS to Support Complex Symbols 3

b) Styled bridges in Internet Explorer version:

11.0.9600.18697 zoom level 14.

c) Styled bridges in Internet Explorer version:

11.0.9600.18697 zoom level 17.

d) Styled bridges in Huawei Mate 10 zoom level 18 (left) and zoom level 19 (right).

Figure 2: Showing the results of applied stylesheets in different zoom levels and devices

4. Conclusion

Rendering composite symbols and using customized cartographic styles is the goal of the current study. We developed the desired

customized styles using CartoCSS styling language and render the resulting map using Kosmtik in different browsers and devices. Controlling the order in which features are being portrayed can be considered as one of the fundamental needs to portray spatial data. To the best of our knowledge, it has not been addressed by CartoCSS styling language until now. So, it would be mentioned as the future direction of the current study.

Acknowledgements

We want to acknowledge OGC Testbed 14 effort which this work is part of the OGC Testbed 14 Portrayal project (Saeedi, 2018).

Author contributions

This paper is part of the OGC Testbed 14 portrayal project which is implemented at the Geo-Web Sensor lab, University of Calgary. Soroush Ojagh imported the dataset and symbol set, preprocessed the dataset, implemented the portrayal methodology and wrote the paper. Dr. Sara Saeedi who is the main editor of the OGC Testbed 14 Symbology Engineering Report contributed regarding the portrayal methodology and the final paper structure.

James Badger developed the web application and web map service and participated in different steps of the project/paper. Dr. Steve Liang supervised the project and also contributed regarding the final paper edits.

References

Fellah, S., Mitchell, E., Giannecchini, S.

(2017). OGC Testbed-13: Portrayal Engineering Report. OGC 17-045.

Retrieved from

http://docs.opengeospatial.org/per/

17-045.html

Geoserver. (2018a). CSS Styling. Retrieved from

https://docs.geoserver.org/latest/en /user/styling/css/index.html

(4)

4 Symbology Encoding Using CartoCSS to Support Complex Symbols

Geoserver. (2018b). Geometry transformations in SLD. Retrieved from

https://docs.geoserver.org/stable/e n/user/styling/sld/extensions/geom etry-transformations.html

Guo, X., Long, Y., & Ji, W. THE DEFINED SYSTEM OF MAP SYMBOL BASED GEOLOGICAL SUBSTANCES.

Huang, W., Mansourian, A., & Harrie, L.

(2017). Geospatial data integration and visualisation using Linked Data. Paper presented at the 4th Association of Geographic Information Laboratories for Europe PhD School, AGILE PhD School 2017.

Landeta, P., Vásquez, J., Rea, X., & García- Santillán, I. (2018). Edition,

Publication and Visualization of Geoservices Using Open-Source Tools. Paper presented at the Conference on Information Technologies and Communication of Ecuador.

Mittlboeck, M., & Belgiu, M. J. I. J. o. G.

(2018). GeoS4S Module OpenGIS and Spatial Data Infrastructure.

14(3).

Saeedi, S., Ertz, O., Giannecchini, S., Aime, A., Jantaraweragul, G., Yutzler, J., St-Louis, J., Badger, J., Ojagh, S., Liang, S., Chassin, T., Buehler, G. (2018). OGC® Testbed-14:

Symbology Engineering Report. OGC 18-

029. Retrieved from

http://www.opengis.net/doc/PER/t14- D029

Références

Documents relatifs

Holding meduc and f educ xed, by how much does sibs have to increase to reduce expected years of education by one year?. (A noninteger answer is acceptable

i) We need two image charges, one for each one of the real charges producing the constant external electric field.. The first term is just the potential due to the external field

Since one can define a Schwartz space and tempered distributions in SL(n, R )/SO(n) as well as a Fourier transform, Fourier quantization can be applied such that the

Chairperson of the first session of the General Assembly of the States Parties to the 2003 Convention for the Safeguarding of the Intangible Cultural Heritage,.. Your Excellency

During this 1906 visit, Rinpoche’s father met the 8 th Khachoed Rinpoche, Drupwang Lungtok Tenzin Palzangpo of Khachoedpalri monastery in West Sikkim, and from

This conjecture, which is similar in spirit to the Hodge conjecture, is one of the central conjectures about algebraic independence and transcendental numbers, and is related to many

Let (M, J) be a compact, connected almost complex manifold, endowed with the action of a connected compact Lie group G, and let L be a positive G-equivariant line bundle on M.. One

We proposed a novel metric, based on a simple structure from factor analysis, for the measurement of the interpretability of factors delivered by matrix de- composition