Abstract
GeoJSON has become one of the most popular format for representing spatial information. Its popularity is due to the fact that it relies on JSON as hosting syntactic structure. Currently, querying in an effective way a GeoJSON document, to extract features of interests, can be hard, for various reasons.
In this paper, we propose a domain-specific language named GeoSoft: it is a high-level tool that hides details of the GeoJSON format, which enables soft querying of features, to express imprecise queries. The paper shows that a GeoSoft query can be effectively and automatically translated into a J-CO-QL script, which is executed by the J-CO Framework, i.e., the execution engine we chose for GeoSoft.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
https://geojson.org/, accessed on 30/10/2021.
- 2.
https://ec.europa.eu/eurostat/web/nuts/background, accessed on 30/10/2021.
- 3.
MongoDB. 2021. Available online: https://www.mongodb.com/ accessed on 30/10/2021.
- 4.
CouchDb. 2021. Available online: https://couchdb.apache.org/ accessed on 30/10/2021.
- 5.
- 6.
https://leafletjs.com/examples/geojson/, accessed on 30/10/2021.
- 7.
https://carto.com/developers/carto-vl/guides/add-data-sources/, accessed on 30/10/2021.
- 8.
https://turfjs.org/, accessed on 30/10/2021.
- 9.
https://www.statsilk.com/maps/convert-esri-shapefile-map-geojson-format, accessed on 30/10/2021.
- 10.
https://www.geopackage.org/guidance/modeling.html, accessed on 30/10/2021.
- 11.
https://ec.europa.eu/eurostat, accessed on 30/10/2021.
- 12.
https://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/administrative-units-statistical-units/nuts, accessed on 30/10/2021. We opted for the 1:3Million scale since the GeoJSON layer at 1:1Million scale was too big to be stored into a MongoDB database.
- 13.
https://ec.europa.eu/eurostat/databrowser/view/nama_10r_3popgdp/default/table, accessed on 30/10/2021.
- 14.
https://ec.europa.eu/eurostat/databrowser/view/NAMA_10_GDP$DEFAULTVIEW/default/ table, accessed on 30/10/2021.
- 15.
for this purpose we used: https://www.convertcsv.com/csv-to-json.htm, accessed on 30/10/2021.
- 16.
https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form, accessed on 30/10/2021.
- 17.
https://www.antlr.org/, accessed on 30/10/2021.
References
Aufaure, M.A., Trépied, C.: A survey of query languages for geographic information systems, p. 3 (1996)
Bieber, M., Kacmar, C.: Designing hypertext support for computational applications. Commun. ACM 38(8), 99–107 (1995)
Bordogna, G., Capelli, S., Ciriello, D.E., Psaila, G.: A cross-analysis framework for multi-source volunteered, crowdsourced, and authoritative geographic information: the case study of volunteered personal traces analysis against transport network data. Geo-Spat. Inf. Sci. 21(3), 257–271 (2018)
Bordogna, G., Capelli, S., Psaila, G.: A big geo data query framework to correlate open data with social network geotagged posts. In: Bregt, A., Sarjakoski, T., van Lammeren, R., Rip, F. (eds.) GIScience 2017. LNGC, pp. 185–203. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-56759-4_11
Bordogna, G., Psaila, G.: Soft aggregation in flexible databases querying based on the vector p-norm. Int. J. Uncertain. Fuzziness Knowl.-Based Syst. 17(supp01), 25–40 (2009)
Bordogna, G., Psaila, G.: Customizable flexible querying in classical relational databases. In: Handbook of Research on Fuzzy Information Processing in Databases, pp. 191–217. IGI Global (2008)
Bosc, P., Pivert, O.: SQLf: a relational database language for fuzzy querying. IEEE Trans. Fuzzy Syst. 3(1), 1–17 (1995)
Garcia Bringas, P., Pastor, I., Psaila, G.: Can blockchain technology provide information systems with trusted database? The case of hyperledger fabric. In: Cuzzocrea, A., Greco, S., Larsen, H.L., Saccà, D., Andreasen, T., Christiansen, H. (eds.) FQAS 2019. LNCS (LNAI), vol. 11529, pp. 265–277. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-27629-4_25
Butler, H., et al.: The GeoJSON format. Internet Engineering Task Force (IETF) (2016)
Cai, G.: GeoVSM: an integrated retrieval model for geographic information. In: Egenhofer, M.J., Mark, D.M. (eds.) GIScience 2002. LNCS, vol. 2478, pp. 65–79. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45799-2_5
Cattell, R.: Scalable SQL and NoSQL data stores. ACM SIGMOD Rec. 39(4), 12–27 (2011)
Costagliola, G., Tortora, G., Tucci, M., Busillo, M.: GISQL—a query language intepreter for geographical information systems. In: Spaccapietra, S., Jain, R. (eds.) Visual Database Systems 3. ITIFIP, pp. 275–286. Springer, Boston, MA (1995). https://doi.org/10.1007/978-0-387-34905-3_17
Egenhofer, M.J.: Spatial SQL: a query and presentation language. IEEE Trans. Knowl. Data Eng. 6(1), 86–95 (1994)
Florescu, D., Fourny, G.: JSONiq: the history of a query language. IEEE Internet Comput. 17(5), 86–90 (2013)
Formica, A., Mazzei, M., Pourabbas, E., Rafanelli, M.: Querying distributed GIS with GeoPQLJ based on GeoJSON, pp. 175–182 (2019)
Fosci, P., Marrara, S., Psaila, G.: Soft querying GeoJSON documents within the J-CO framework. In: 16th International Conference on Web Information Systems and Technologies (WEBIST 2020), pp. 253–265. SCITEPRESS-Science and Technology Publications, Lda. (2020)
Fosci, P., Psaila, G.: J-CO, a framework for fuzzy querying collections of JSON documents (demo). In: Andreasen, T., De Tré, G., Kacprzyk, J., Legind Larsen, H., Bordogna, G., Zadrożny, S. (eds.) FQAS 2021. LNCS (LNAI), vol. 12871, pp. 142–153. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-86967-0_11
Fosci, P., Psaila, G.: Powering soft querying in J-CO-QL with JavaScript functions. In: Sanjurjo González, H., Pastor López, I., García Bringas, P., Quintián, H., Corchado, E. (eds.) SOCO 2021. AISC, vol. 1401, pp. 207–221. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-87869-6_20
Fosci, P., Psaila, G.: Towards flexible retrieval, integration and analysis of JSON data sets through fuzzy sets: a case study. Information 12(7), 258 (2021)
Galindo, J., Urrutia, A., Piattini, M.: Fuzzy Databases: Modeling, Design, and Implementation. IGI Global (2006)
Anderson, J.C., Lehnardt, J., Slater, N.: CouchDB: The Definitive Guide. O’Reilly Media, Inc. (2010)
Jacobs, B.E., Walczak, C.A.: A generalized query-by-example data manipulation language based on database logic. IEEE Trans. Softw. Eng. 1, 40–57 (1983)
Kim, H.J., Korth, H.F., Silberschatz, A.: Picasso: a graphical query language. Softw. Pract. Exp. 18(3), 169–203 (1988)
Mayer, B.: Beyond icons: towards new metaphors for visual query languages for spatial information systems. In: Cooper, R. (ed.) IDS 1992. Workshops in Computing, pp. 113–135. Springer, Glasgow (1992). https://doi.org/10.1007/978-1-4471-3423-7_8
Nayak, A., Poriya, A., Poojary, D.: Type of NoSQL databases and its comparison with relational databases. Int. J. Appl. Inf. Syst. 5(4), 16–19 (2013)
Ong, K.W., Papakonstantinou, Y., Vernoux, R.: The SQL++ unifying semi-structured query language, and an expressiveness benchmark of SQL-on-Hadoop, NoSQL and NewSQL databases. CoRR, abs/1405.3631 (2014)
Psaila, G., Fosci, P.: Toward an anayist-oriented polystore framework for processing json geo-data. In: International Conferences on Applied Computing 2018, Budapest, Hungary, 21–23 October 2018, pp. 213–222. IADIS (2018)
Psaila, G., Fosci, P.: J-CO: a platform-independent framework for managing geo-referenced JSON data sets. Electronics 10(5), 621 (2021)
Psaila, G., Marrara, S.: A first step towards a fuzzy framework for analyzing collections of JSON documents. In: IADIS AC 2019, pp. 19–28 (2019)
Staes, F., Tarantino, L., Tiems, A.: A graphical query language for object oriented databases. In: Proceedings 1991 IEEE Workshop on Visual Languages, pp. 205–210 (1991)
Zadeh, L.A.: The concept of a linguistic variable and its application to approximate reasoning—I. Inf. Sci. 8(3), 199–249 (1975)
Acknowledgment
We warmly thank Luca Assolari, student of the Master Degree in Computer Science at University of Bergamo (Italy), who implemented the prototype GeoSoft interpreter.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
A Syntax of GeoSoft
A Syntax of GeoSoft
In Fig. 7, we present the syntax (grammar) of the GeoSoft language introduced in Sect. 5. The grammar is formulated in EBNFFootnote 16 notation according to the convention applied by ANTLR (ANother Tool for Language Recognition)Footnote 17. ANTLR is a widely-known parser generator that denotes non-terminal elements (rules) in lower case, while terminal elements (tokens) are in upper case or directly declared between quotes. The geoSoft rule is the starting rule of the grammar.
For the sake of simplicity, we do not include the definitions of the condition, expression and number rules, but their meaning is denoted by their names. The ID and DOT_ID tokens denote the classic identifiers, respectively, not having (ID) or having (DOT_ID) a dot character as starting character.
Rights and permissions
Copyright information
© 2023 Springer Nature Switzerland AG
About this paper
Cite this paper
Fosci, P., Marrara, S., Psaila, G. (2023). GeoSoft: A Language for Soft Querying Features Within GeoJSON Information Layers. In: Marchiori, M., Domínguez Mayo, F.J., Filipe, J. (eds) Web Information Systems and Technologies. WEBIST WEBIST 2020 2021. Lecture Notes in Business Information Processing, vol 469. Springer, Cham. https://doi.org/10.1007/978-3-031-24197-0_11
Download citation
DOI: https://doi.org/10.1007/978-3-031-24197-0_11
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-24196-3
Online ISBN: 978-3-031-24197-0
eBook Packages: Computer ScienceComputer Science (R0)