4 novembre 2024GeoAI: key developments & insights It’s been a while since my post on geo and the AI hype in 2019. Back then, I didn’t use the term “GeoAI”, even though it has certainly been around for a while (including, e.g., with dedicated SIGSPATIAL workshops since 2017). GeoAI isn’t one single thing. It’s an umbrella term, including: “AI for Geo” (using AI methods in Geo, e.g. deep learning for object recognition in remote sensing images) and “Geo for AI” (integrating geographic concepts into AI models, e.g. by building spatially explicit models). [Zhang 2020] [Li et al. 2024] Today’s post is a collection of key GeoAI developments I’m aware of. If I missed anything you are excited about, please let me know here in the comments or over on Mastodon. Background A week ago, I had the pleasure to attend a “Specialist Meeting” on GeoAI here in Vienna, meeting over 40 researchers from around the world, from Master students to professor emeritus. Huge props to Jano (Prof. Krzysztof Janowicz) and his team at Uni Wien for bringing this awesome group of people together. The elephant in the room: LLMs Unsurprisingly, LLMs and the claims they make about geography are a mayor issue due to the mistakes they make and the biases behind them. A …
6 octobre 2024LLM-based spatial analysis assistants for QGIS After the initial ChatGPT hype in 2023 (when we saw the first LLM-backed QGIS plugins, e.g. QChatGPT and QGPT Agent), there has been a notable slump in new development. As far as I can tell, none of the early plugins are actively maintained anymore. They were nice tech demos but with limited utility. However, in the last month, I saw two new approaches for combining LLMs with QGIS that I want to share in this post: IntelliGeo plugin: generating PyQGIS scripts or graphical models At the QGIS User Conference in Bratislava, I had the pleasure to attend the “Large Language Models and GIS” workshop presented by Gustavo Garcia and Zehao Lu from the the University of Twente. There, they presented the IntelliGeo Plugin which enables the automatic generation of PyQGIS scripts and graphical models. The workshop was packed. After we installed all dependencies and the plugin, it was exciting to test the graphical model generation capabilities. During the workshop, we used OpenAI’s API but the readme also mentions support for Cohere. I was surprised to learn that even simple graphical models are actually pretty large files. This makes it very challenging to generate and/or modify models because …
21 septembre 2024Trajectools tutorial: trajectory preprocessing Today marks the release of Trajectools 2.3 which brings a new set of algorithms, including trajectory generalizing, cleaning, and smoothing. To give you a quick impression of what some of these algorithms would be useful for, this post introduces a trajectory preprocessing workflow that is quite general-purpose and can be adapted to many different datasets. We start out with the Geolife sample dataset which you can find in the Trajectools plugin directory’s sample_data subdirectory. This small dataset includes 5908 points forming 5 trajectories, based on the trajectory_id field: We first split our trajectories by observation gaps to ensure that there are no large gaps in our trajectories. Let’s make at cut at 15 minutes: This splits the original 5 trajectories into 11 trajectories: When we zoom, for example, to the two trajectories in the north western corner, we can see that the trajectories are pretty noisy and there’s even a spike / outlier at the western end: If we label the points with the corresponding speeds, we can see how unrealistic they are: over 300 km/h! Let’s remove outliers over 50 km/h: Better but not perfect: Let’s smooth the trajectories to get rid of more of the …
29 août 2024Building spatial analysis assistants using OpenAI’s Assistant API Earlier this year, I shared my experience using ChatGPT’s Data Analyst web interface for analyzing spatiotemporal data in the post “ChatGPT Data Analyst vs. Movement Data”. The Data Analyst web interface, while user-friendly, is not equipped to handle all types of spatial data tasks, particularly those involving more complex or large-scale datasets. Additionally, because the code is executed on a remote server, we’re limited to the libraries and tools available in that environment. I’ve often encountered situations where the Data Analyst simply doesn’t have access to the necessary libraries in its Python environment, which can be frustrating if you need specific GIS functionality. Today, we’ll therefore start to explore alternatives to ChatGPT’s Data Analyst Web Interface, specifically, the OpenAI Assistant API. Later, I plan to dive deeper into even more flexible approaches, like Langchain’s Pandas DataFrame Agents. We’ll explore these options using spatial analysis workflow, such as: Loading a zipped shapefile and investigate its content Finding the three largest cities in the dataset Selecting all cities in a region, e.g. in Scandinavia from the dataset Creating static and inter …
23 août 2024MovingPandas 0.19 released! This release is the first to support GeoPandas 1.0. Additionally, this release adds multiple new features, including: New explore() function adds interactive folium / leaflet maps New support for mfjson trajectory For the full change log, check out the release page. We have also revamped the documentation at https://movingpandas.readthedocs.io/ using the PyData Sphinx Theme: On a related note: if you know what I need to change to get all Trajectory functions listed in the TOC on the right, please let me know. …
12 juillet 2024Trajectools 2.2 released If you downloaded Trajectools 2.1 and ran into troubles due to the introduced scikit-mobility and gtfs_functions dependencies, please update to Trajectools 2.2. This new version makes it easier to set up Trajectools since MovingPandas is pip-installable on most systems nowadays and scikit-mobility and gtfs_functions are now truly optional dependencies. If you don’t install them, you simply will not see the extra algorithms they add: If you encounter any other issues with Trajectools or have questions regarding its usage, please let me know in the Trajectools Discussions on Github. …
8 juillet 2024New MovingPandas tutorial: taking OGC Moving Features full circle with MF-JSON Last week, I had the pleasure to meet some of the people behind the OGC Moving Features Standard Working group at the IEEE Mobile Data Management Conference (MDM2024). While chatting about the Moving Features (MF) support in MovingPandas, I realized that, after the MF-JSON update & tutorial with official sample post, we never published a complete tutorial on working with MF-JSON encoded data in MovingPandas. The current MovingPandas development version (to be release as version 0.19) supports: Reading MF-JSON MovingPoint (single trajectory features and trajectory collections) Reading MF-JSON Trajectory Writing MovingPandas Trajectories and TrajectoryCollections to MF-JSON MovingPoint This means that we can now go full circle: reading — writing — reading. Reading MF-JSON Both MF-JSON MovingPoint encoding and Trajectory encoding can be read using the MovingPandas function read_mf_json(). The complete Jupyter notebook for this tutorial is available in the project repo. Here we read one of the official MF-JSON MovingPoint sample files: traj = mpd.read_mf_json(‘data/movingfeatures.json’) Writing MF-JSON To write MF-JSON, the Trajectory and TrajectoryCollection classes provide a to_mf_js …
30 juin 2024New interactive trajectory plots for MovingPandas & experiments on their interpretation using ChatGPT 4o With the release of GeoPandas 1.0 this month, we’ve been finally able to close a long-standing issue in MovingPandas by adding support for the explore function which provides interactive maps using Folium and Leaflet. Explore() will be available in the upcoming MovingPandas 0.19 release if your Python environment includes GeoPandas >= 1.0 and Folium. Of course, if you are curious, you can already test this new functionality using the current development version. This enables users to access interactive trajectory plots even in environments where it is not possible to install geoviews / hvplot (the previously only option for interactive plots in MovingPandas). I really like the legend for the speed color gradient, but unfortunately, the legend labels are not readable on the dark background map since they lack the semi-transparent white background that has been applied to the scale bar and credits label. Speaking of reading / interpreting the plots … You’ve probably seen the claims that AI will help make tools more accessible. Clearly AI can interpret and describe photos, but can it also interpret MovingPandas plots? ChatGPT 4o interpretations of MovingPandas plots Not bad. And what …
30 mai 2024ChatGPT Data Analyst vs movement data Today, I took ChatGPT’s Data Analyst for a spin. You’ve probably seen the fancy advertising videos: just drop in a dataset and AI does all the analysis for you?! Let’s see … Of course, I’m not going to use some lame movie database or flower petals data. Instead, let’s go all in and test with a movement dataset. You don’t get a second chance to make a first impression, they say. — Well, Data Analyst, you didn’t impress on the first try. How hard can it be to guess the delimiter and act accordingly? Anyway, let’s help it a little: That looks much better. It makes an effort to guess what the columns could mean and successfully identifies the spatiotemporal information. Now for some spatial analysis. On first try, it didn’t want to calculate the length of the trajectories in geographic terms, but we can make it to: It will also show the code used to get to the results: And indeed, these are close enough to the results computed using MovingPandas: “What about plots?” I hear you ask. For a first try, not bad at all: Let’s see if we can push it further: Looks like poor Data Analyst ended up in geospatial library dependency hell It’s interesting to watch it try find a solution. Alas, no ba …
20 mai 2024New Trajectools 2.1 and MovingPandas 0.18 releases Today marks the 2.1 release of Trajectools for QGIS. This release adds multiple new algorithms and improvements. Since some improvements involve upstream MovingPandas functionality, I recommend to also update MovingPandas while you’re at it. If you have installed QGIS and MovingPandas via conda / mamba, you can simply: conda activate qgis mamba install movingpandas=0.18 Afterwards, you can check that the library was correctly installed using: import movingpandas as mpdmpd.show_versions() Trajectools 2.1 The new Trajectools algorithms are: Trajectory overlay — Intersect trajectories with polygon layer Privacy — Home work attack (requires scikit-mobility) This algorithm determines how easy it is to identify an individual in a dataset. In a home and work attack the adversary knows the coordinates of the two locations most frequently visited by an individual. GTFS — Extract segments (requires gtfs_functions) GTFS — Extract shapes (requires gtfs_functions) These algorithms extract public transport routes (GTFS shapes) and route segments between stops (GTFS segments) from GTFS ZIP files using gtfs_functions.Feed.shapes and .segments, respectively. Furthermore, we have fixed issue with pr …
Besoin de conseils, assistance, formation?
Visitez le site de NASCA et découvrez toutes nos offres de coaching SIG