Extending Wagtail CMS as a Spatial Data Infrastructure
Transcript
By Speaker 1, Speaker 2, Speaker 3. From Wagtail Space US 2024. Published July 19, 2024.
Watch the video Markdown version 2,416 words · auto-generated · en
Transcript
Automatically transcribed, so expect mistakes in names and technical terms. Filler words are removed.
Speaker 1
Enough.
Speaker 2
That's good. Okay.
Speaker 1
All right.
Speaker 2
Pardon the technical context. Okay, I'd like to welcome our next speaker, Cesar Benjamin. He is a Digital Government Director all the way from Monterey, Mexico. He will be talking about extending Wagtail CMS as spatial data. Give a big warm welcome to Caesar.
Speaker 1
Thanks. First of all, I want to say English is not my primary language.
Speaker 3
I have difficulty sometimes to express
Speaker 1
excuse me so
Speaker 3
In any way I will try to do my best. A disclaimer in my country there is some thing with the work infrastructure and it's difficult to say and I will say it's the SDI instead of special data infrastructure from this month Is the definition in boxes something about a set of technology
rules, people, data, so on for the management of territory, mainly in government aspect topics but can be used in research academics and so on the other hand, what style everyone knows is CMS, not special data infrastructure is it's mainly for informative contact Content management for blogs, news, forms for surveys
and document and image management. Gurry Well, there is not an SDI, right? I personally I worked with Wachtel for deploy many sites in Monterey in government. We have a single instance of WACT to manage all the content of all the sites in multi-site Perspective. I have to
Something about the old databases in the in Hughes Stars was not thinking about the special types in the beginning was the text types they type they types Yes. Fortunately Postgres have an extension
which allow us to manage special data in the manner that is not only the representation of the geometry Instead of that have many operations, special indexes, Can we get do queries like in the tabular data, but in the geometrical way? That was possible along the evolution of the databases and today with post -GIS we can do that.
When we think about representation a place, the most natural way of thinking is cut files like in this slide. These files give a special representation, but it's only a trap. It has no information relative to the features of setting drawing. We are not able to extract any useful information without the adequate context. The information is in fact part of the draw of the drawing it's not data information in fact
There is a format called Shapefile building by the company called Sri Who is a company that provides technology for special information. was the first of company that did that but shape files today is an of that outdated format is based on dbf files who comes from the d base tree a database from the seventies His special component was an independent file apart from the
DBA and is a collection of many files. And that becomes complex to handle with the time. On the other hand, post Postgres QR have natively all that I only want to show the a great amount of that data types that it supports natively. Django is able to support the majority of the operation with that
data types. This form of the R O R and Yangular framework do it through his serializers This means that nowadays all the necessary pays to have a special data content management system exist. And S D A is a reality representation about where something happens. Mainly we use abstraction of reality using points, lines or polygons to represent something in space.
And that is now possible in databases level thanks to the extension for keys. With all that pieces we can build an Sti In fact, Django is able to handle queries to the to the ORM and his special operations natively without no needs of external libraries or other things. But I if all the parts for this system exist, I
is not one yet. Well yes it exists and in the market are some alternatives today but are some complex like that diagram need a lot of components integrated and connected to get the complete system. Nowadays there are two solutions that were widely known and used for online for one hand arc arch g online which is expensive and not is and not so
standard in many aspects and GeoNode built with Django and GeoServer since all of us here value In and care about free software, I am going to leave out Argis from this conversation GeoNode is a strength project that gathers many existing libraries and frameworks and uses them to create a platform for special data management as a sort of CMS They even promote themselves as a special data infrastructure content management system. But it 's a huge amount of
technologies, libraries and stuff is it can be very complex. For any person who approached for his first time. So I will comment a bit about my previous experience with spatial data I was working in the Universidad Nacional Autónoma de Mexico in a project for the government of Jalisco at the year 28
This was an inventory of urban trees in the metropolitan art area. This needs the handle of data and database databases about the existing trees in the city, his health stake status, So on. When I did this work, I had to do it in an artisan way of the parts there I did a platform for registry of hazard and risk map with gender
disparity for the sapopan halist ho Sub opense in Halisco in the 2020 year. This platform is active in the yeah And index of social environmental conflicts in all the country. This is the This last was made completely in wacht tail when the pi the persons who request me the platform
they come with a set of files and I ask how they think they will warranty the extensibility of the of the data. Then I propose to use rack tail instead of the files But this way was a bit hard for me because each time each new platform I had to build a new platform from zero model each part and so on
and was very hard work. Then I discover a platform called John as I as I say Before in fact we used GeoNode in the government of Monterey as our main special that special data infrastructure is really a very good product Well I guess it's can be not enough for certain things of stuff
For example, I discovered that the last Version was stuck in Yango three dot two version So all then I open an issue in GitHub, I take the tasks of operate many of the dependencies and proposed that it must be updated. I did a lot of work to upgrade GeoNode to the recent version of Django it exists issue
close it today but I guess we can do it better the platform is so huge is the it demands a lot of higher computer resources. It requests two database, one for Tjangon metadata and one more two data for your server and the two services exist separately and needs a bridge to handle information from one place to another and the sum of all the it all its parts makes into a weird and painful Frankenstein
system And to make things harder, installation, fine tuning, and maintenance require a high knowledge and skills of many technologies. So my proposal is following the keys principle with only one thing and a library that publishes special data standards called by OGC API Py OGC API is a labor for the standard OG C API, which is a standard in development yet is a model is a modern standard
then with only that these two pieces we can have a simple and modern SDI I was working in a proof of concept using these two parts. I am about to show that proof of concept. Now it runs and allows me to store and publish native RESTful APIs from Django REST framework and It consists in a single service, single service, Django, a single database.
Can be a can have can be have a fine-grained ACI basic in Django only And well over this was the pump into this picture. I like a lot the workflows, that revisions, that kind of stuff that provided. us in pages but I did the y I used that the mixing stuff implements that for handle the flows in my props
Okay. I want to show How can I change I can laugh. Yes, yeah. Great box. Thank you. That's a good promotion.
Okay, this is my demo of using Water for special data management. In GeoNode, for example, we have flat tables with data. Each file we apply to the platform has a set of registry. in a flat mannet and we have no relations and a way to update or add new registries the set keeps like one
supply of updates and we can add new registers then well i have many types of resources tables that for forms polygons lines I have this was made as a snippet there, not as not as page because the page had a lot of Feels that
is not necessary. We have the ability to add files but in this is another manner different to the documents handle because I want to upload the file once per layer and not the file don't need to stay for other uses When the file is aided I can progressive progressively
add more files and extract the spy the special data and i will try a wrong file This file this will make a show and error because it's not the same kind of file and it's a cube.
If we start with no files, I can add a special register. And the there you are. can have the any shape of his structure. I want to avoid the modeling of data each time the new data set is needed then I can use your JSON data
And does it not matter because it is magnet with the capacity to only at the data. Then if I have a special format file, I can add Apply with geometry and data
No, we have Each registry is in the is the in individual space with his not special data in JSON format we can change the fields on this it's not constrained to fix it structure. All this I am telling to you is about limitations I count in GeoNode
when I upload an a file in GeoNode, the structure of the file constraints me to always use that structure But with this way I can add a new field and
I don't know what happens. But with this We can have management of special data inside Wachtel in the Wachtel way with The use of revisions and the workflows and we can see the history of all the updates in the in the data But connected and published as
a specially standard using the IGL API library. Por ejemplo, eh, este We can take information that is in wacht tail at this moment using as this api standard
This page seems visualiz seems to be a visualization application but it is not is An H Tm H D L Way because React in fact is an API With two modes of view, the Api view and the H D I L view, with the same data. Then The thing I want to achieve is to have API
to handle special data but handle special data is hard today because we have to do it manually taking all files configuring editing configuration files and so on. There is not a way to handle this information in a comfortable way like of tail or yang one then i want to take the two parts and make only tool
to manage publish and using the special diagram this as i thought told is a proof of concept there is yet work to do I have to completely integrate this by open Geo API because today I have to configure manually in a manual way each layer added in Wachtel to see in this space. But like this made with Python,
it is possible. then in a couple of weeks I guess I can achieve the on the feeble integration. And Well I lost the presentation but the last the last so Okay.
Speaker 2
Thank you, Caesar. That was really cool what you built with geospatial wagtail. So we're gonna take a five-minute break and then we will wrap up with our panels, panels, sorry, packages, packages, packages discussion which will be a panel. So five minutes and we'll see you all