Classes and Methods for Spatial Data
Proposal by Laurine DARGAUD
Mentors : Serge STINCKWICH & Etienne DELAY & Norbert HARTL
As The Economist says: “The world’s most valuable resource is no longer oil, but data”. Nowadays data and especially geospatial data become central in our societies. Each one of us needs to be able to deal with data and spatial data.
I won’t introduce it better than the mentors of this project.
But what is geospatial data, exactly?
Spatial data is “information about the locations and shapes of geographic features and the relationships between them, usually stored as coordinates and topology” as stated by the ESRI (Environmental Systems Research Institute). To represent such data, points are elementary objects which can be located through XY-coordinates on maps. Define relationships between points: you build lines. Then define relationships between lines: you build closed or opened shapes. This is how marks, routes or travel circuits can be represented on maps. Such data are stored in a structured way in various formats like GeoJSON for instance.
Since a picture speaks better than words, let me show you an example:
This visualisation provided by an web interface is based on the geospatial data GeoJSON file on the left-side, which describes 4 European capitals with meta-data (original source). We can note here how points are defined: they are elements of geometry which are gathered into a collection of features. As we can see, each point has coordinates to locate them properly on the map, and properties to get more information such as capital name or relative country.
In order to improve access to geospatial or location information, the Open Geospatial Consortium (OGC) - a worldwide community, defines several standards and specifications. One of their standards called “Simple Feature Access” specifies a common storage and access model of mostly two-dimensional geometries (point, line, polygon, multi-point, multi-line, … ) used by most of Geographic Information Systems (GIS).
What about Pharo?
In the Pharo community, many projects dealing with maps or geospatial data emerged for both research and industry. Thus Pharo libraries like Shapes or OpenStreetMaps, have been developed to manipulate geospatial data. However each of them is independant and they implement their own features, interface and model.
To build a solid foundation for geospatial data processing, the Pharo-GIS organization was established recently on GitHub. It aims to handle “Simple Feature” standards in Pharo.
Thus I would like to contribute to this Pharo project during Google Summer of Code 2021 helping them to build a first functional model and visualisation interface.
Main goal: visualise geospatial data in Pharo based on “Simple Feature” OGC Standards
Build a Pharo object model based on essential “Simple Feature” specifications
Being able to load a geospatial data file into Pharo
Being able to visualize geospatial data files through a simple Pharo interface
Support basic geometry operations
To reach my goals, I split my work into three steps:
Step 1 : Research, documentation and framing the subject
Explore existing libraries in Python, R, and web applications to better understand how geospatial data frameworks and libraries are structured
Have a look to existing Pharo packages, classes and methods dealing with geospatial data: perhaps I can find inspiration in some of their features
Write a short online report (2-3 pages) to sum up the current situation about geospatial data processing in Pharo
Study OGC “Simple Feature” Specifications detailed on their website, specially classes hierarchy and implementation methods of their model
Select most important features from based on the needs of research teams working on geospatial data, in coordination with my mentors
I plan to complete this step in June, in parallel with the end of my courses at Ecole Centrale de Lille.
Step 2 : Build a functional Pharo model
Implement a first kernel version of “Simple Feature Access” in Pharo
Test classes and methods writing unitary tests
Setup a continuous integration to keep a functional code in the course of changes via GitHub tools
Support existing geospatial data file formats like GeoJSON or KML
I plan to work on this model during the two or three first weeks of July.
Step 3 : Visualise geospatial data and perform interactions
Choose an UI framework to visualize geospatial data within Pharo: Roassal, Spec, … ?
Implement a basic visualisation engine for geospatial data in Pharo
Implement basic geometric operations to allow user to interact with geospatial data
Future development, if possible
Develop a user-friendly interface to perform more advanced visualisation and operations
For each step, I will write clear documentation through both class/method comments and ReadMe.
During implementation steps, I will write unit tests and I will assure the validity of my code with good continuous integration practices. I will try to develop a code as modular as possible, starting with a functional kernel of methods then adding features one by one.
To contribute actively to Pharo-Gis Project, I forked it on GitHub so that I can commit progressively my features then suggest a Pull Request to be merged to the original code after reviews from my mentors and other members of the community.
To keep my mentors, interested developers and the Pharo community informed, I plan to publish regular blog posts on a Google Site to share ideas, encountered issues, progress and in-progress features. This website is not created yet, but I will share the link as soon as possible to the Pharo community.
I will also keep a sustained email exchange with my mentors and I can keep in touch with them through video calls on the Pharo Discord.
Benefits to Community
Pharo-GIS Project can be very helpful and useful for research groups and companies dealing with geospatial data in Pharo.
For instance, this development will support the work of Norbert Hartl with his company Zweidenker, which provides web services and applications developed in Pharo, to navigate or search specific places on maps to their customers. Another potential Pharo project that might be interested is the Cormas project [COmmon pool Resources and Multi-Agent Simulations] led by Serge Stinckwich and Pierre Bommel, which deals with spatial agent-based modeling.
Since a Research internship spent in RMoD research team from Inria, I got highly interested in Pharo. I really appreciate its intuitive, fluid and completely object-oriented user interface. I would be happy to discover the geospatial data field through this community. After having discovered parsing and markup languages, I was particularly interested in vizualisation processing and tool development; this project perfectly fits those aspirations. Moreover I think having a friendly geospatial data visualisation tool can be great for the Pharo community, and I am curious about existing techniques to process this kind of data.
Pharo existing libraries I plan to study during the Step 1:
Pharo-GIS project, the Pharo project I want to contribute to
“Simple Feature Access” Specifications from OGC [PDF]: the standards I plan to implement in Pharo