Welcome to Planet OSGeo

April 24, 2024

April 23, 2024

April 22, 2024

April 21, 2024

This is probably my last posting before I go in for surgery and start my new life as a “patient”.

I was talking with a friend, and we were laughing at how “patient” has the dual meaning of forebearance and under medical care. We didn’t pull out our phones and find out that it is also from the Latin, for “suffering”.

Anyways, suffering is definitely part of life in CancerLand, and surely a reason why we are culturally so frightened of it, even when prognosis is good. Some measure of suffering will be extracted, on the way through, and that’s if you are lucky.

A poster on the groups shared that she felt angry, when talking to civilians about their “troubles”. She said wanted to scream at them, “well at least you don’t have cancer!”

Someone responded, “the healthy man desires many things, the sick man desires only one thing”. Which seemed the most pithy perspective.

I shared that I felt a little guilty posting about my own mental state, dealing with a stage two diagnosis, in a forum frequented by many people in stages three and four. And people were fairly uniform in saying, there is something about hearing the words, “you have cancer”, that marks a sharp dividing line in ones life, no matter what the physical progression is.

Surgery will be my first sharp physical dividing line. Hopefully also my last, but as usual the grey area is in effect.

Talk to you again soon, on the other side, inshalla.

Covid Era Row

April 21, 2024 12:00 AM

April 20, 2024

Today’s post is a QGIS Server update. It’s been a while (12 years 😵) since I last posted about QGIS Server. It would be an understatement to say that things have evolved since then, not least due to the development of Docker which, Wikipedia tells me, was released 11 years ago.

There have been multiple Docker images for QGIS Server provided by QGIS Community members over the years. Recently, OPENGIS.ch’s Docker image has been adopted as official QGIS Server image https://github.com/qgis/qgis-docker which aims to be a starting point for users to develop their own customized applications.

The following steps have been tested on Ubuntu (both native and in WSL).

First, we need Docker. I installed Docker from the apt repository as described in the official docs.

Once Docker is set up, we can get the QGIS Server, e.g. for the LTR:

docker pull qgis/qgis-server:ltr

Now we only need to start it:

docker run -v $(pwd)/qgis-server-data:/io/data --name qgis-server -d -p 8010:80 qgis/qgis-server:ltr

Note how we are mapping the qgis-server-data directory in our current working directory to /io/data in the container. This is where we’ll put our QGIS project files.

We can already check out the OGC API landing page at http://localhost:8010/wfs3/

Let’s add a sample project from the Training demo data repo. (You may need to install unzip if you haven’t yet.)

mkdir qgis-server-data
cd qgis-server-data
wget https://github.com/qgis/QGIS-Training-Data/archive/release_3.22.zip
unzip release_3.22.zip
mkdir world
cp QGIS-Training-Data-release_3.22/exercise_data/qgis-server-tutorial-data/world.qgs world/
cp QGIS-Training-Data-release_3.22/exercise_data/qgis-server-tutorial-data/naturalearth.sqlite world

Giving us:

QGIS Server should now be serving this sample project. Let’s check with a WMS GetMap request:

http://localhost:8010/ogc/world?LAYERS=countries&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&CRS=EPSG:4326&WIDTH=400&HEIGHT=200&BBOX=-90,-180,90,180

Giving us:

If you instead get the error “<ServerException>Project file error. For OWS services: please provide a SERVICE and a MAP parameter pointing to a valid QGIS project file</ServerException>”, it probably means that the world.qgs file is not found in the qgis-server-data/world directory.

Of course, we can also add http://localhost:8010/ogc/world to the WMS and WFS server connections in our QGIS Desktop:

by underdark at April 20, 2024 11:54 AM

April 19, 2024

April 18, 2024

GeoServer 2.24.3 release is now available with downloads (bin, war, windows), along with docs and extensions.

This is a maintenance release of GeoServer providing existing installations with minor updates and bug fixes. GeoServer 2.24.3 is made in conjunction with GeoTools 30.3, and GeoWebCache 1.24.3.

Thanks to Andrea Aime (GeoSolutions) for making this release.

Release notes

New Feature:

  • GEOS-11077 Implement Requirement Class “Search” from OGC API - Features Part 5 proposal
  • GEOS-11225 [AuthKey] AuthKey synchronize the user/group automatically
  • GEOS-11267 csw-iso: multiple mappings should also have multiple queryable mappings
  • GEOS-11279 metadata: allow same field on multiple tabs

Improvement:

  • GEOS-11260 JNDI tutorial uses outdated syntax
  • GEOS-11276 Use style_body to define CSS style for a layer
  • GEOS-11288 Improve input validation in ClasspathPublisher
  • GEOS-11306 Java 17 does not support GetFeature lazy JDBC count(*)
  • GEOS-11327 Add warning about using embedded data directories
  • GEOS-11329 Update MapML viewer to release 0.13.0
  • GEOS-11334 Update MapML viewer to release 0.13.1
  • GEOS-11342 STAC should exclude items when the collection in path is wrong
  • GEOS-11347 STAC Landing Page links should include root link
  • GEOS-11359 Update MapML viewer to release 0.13.2

Bug:

  • GEOS-11174 GWC rest api returns erroneous truncated response when gzip http encoding is enabled
  • GEOS-11205 Layer page: style image fails if it is in isolated workspace
  • GEOS-11236 WFS 2.0.0/GetFeature - Shapefile - “We have had issues trying to flip axis”
  • GEOS-11256 Cannot retrieve LegendGraphic from a PostGIS datastore with ‘hideEmptyRules’ and ‘Support on the fly geometry simplification’ enabled
  • GEOS-11263 hideEmptyRules not working in JSON LegendGraphic
  • GEOS-11266 csw-iso: missing fields in summary response
  • GEOS-11278 metadata: only selected tab is submitted
  • GEOS-11285 GWC REST Content-Encoding gzip returns broken response
  • GEOS-11290 With Oauth enabled, anon users get random auth requests
  • GEOS-11291 GeoFence: Cleanup stale log4j references
  • GEOS-11299 Performance regression in GeoJSON output generated in EPSG:900913
  • GEOS-11312 Inconsistent Memory Units in Legend Image Creation
  • GEOS-11335 A layer in an authority other than EPSG may fail to reload after restart

Task:

  • GEOS-11307 Update apache-commons-lang3 to version 3.14.0 for Java 17 and Java 21 support
  • GEOS-11316 Update Spring version to 5.3.32
  • GEOS-11360 Upgrade Apache POI from 4.1.1 to 5.2.5
  • GEOS-11362 Upgrade Spring libs from 5.3.32 to 5.3.33

For the complete list see 2.24.3 release notes.

Community Updates

Community module development:

  • GEOS-11305 Add layer information in the models backing STAC
  • GEOS-11330 OAuth2 kid verification should be optional
  • GEOS-11339 Introducing the Features Autopopulate Community Plugin
  • GEOS-11340 WFS Freemarker HTML Outputformat
  • GEOS-11345 STAC Conformance URIs need to be updated to v1.0.0
  • GEOS-11348 JMS cluster does not allow to publish style via REST “2 step” approach
  • GEOS-11358 Feature-Autopopulate Update operation does not apply the Update Element filter

Community modules are shared as source code to encourage collaboration. If a topic being explored is of interest to you, please contact the module developer to offer assistance.

About GeoServer 2.24 Series

Additional information on GeoServer 2.24 series:

Release notes: ( 2.24.3 | 2.24.2 | 2.24.1 | 2.24.0 | 2.24-RC )

by Andrea Aime at April 18, 2024 12:00 AM

Cancer is a mind fuck.

I mean, it’s a body fuck too, obviously, but the early experience for me has been of weird gyrations of mental health and mood with each passing day.

The first thing I did was the first thing everyone does – look up all the different probabilities of five year survival, because that’s what is at the top of the Google search.

With a stage two diagnosis (hard to know if that’s actually what I have, though) Google says I have a 10% chance of dying over the next five years.

That feels like… a lot? A scary amount.

Rowing

But wait, here’s a fact – my odds of dying just in the ordinary course of affairs over the next five years are about 4.5%.

Does that stop me from being 1000% more terrified, on a daily basis, since receiving my diagnosis? No it does not.

A good deal of that terror, I think, is that cancer promises a patient a long and painful interaction with a medical system that has only destructive rear-guard actions at hand to stop it. Cut things out; kill it with poison; zap it with radiation. These procedures all leave a body worse for wear, and if they don’t work… they bring you back and do some more of them.

My great grandfather died while rolling a ball on the lawn bowling green in his late 80s. Massive stroke, he died doing something he loved and was dead before he hit the ground. Floyd Ramsey hit the mortality jackpot.

Naturally, I would also like to hit that jackpot. Cancer says, “not so fast, you might have a different life experience ahead of you”.

It would be a little too pat to say that getting a diagnosis starts you off on the stages of grief, because that implies some orderly process to the mental evolution. I am not progressing linearly through the stages of grief, so much as visiting them randomly, over and over, in an emotional shuffle mode.

Some days are denial days. Some days are acceptance days. Some days are bargaining days.

Mountain

I told my councillor last week that “I only feel OK to the extent that I am dissociative”, and that seems to still hold true. I am at my most together when I have fully distracted myself from the diagnosis. I’m not sure if this counts as “taking one day at a time”. Probably not.

Talk to you again soon, on the other side, inshalla.

April 18, 2024 12:00 AM

April 17, 2024

April 16, 2024

A common refrain on my Facebook cancer support groups is that the first months after diagnosis can be among the most stressful. You know the least about the actual extent of your condition, but you simultaneously know for sure that your life is going to change a great deal, starting now.

It is also the first time for grieving.

In the worst case it is grieving actual mortality, the very real threat of the end. But even in a relatively low impact diagnosis like my (current) one, there is grief. It is the grief of lost futures, lost plans, lost self-image.

I am a person who runs and climbs and rows and goes on long walks and travels and teaches and speaks publicly. At least, I was. If all goes according to plan, there will eventually be a new me, who does some or many of those things. Maybe not all of them anymore, there is no predictability or control.

Last Christmas I took my family to Rome over the holidays. “No time like the present!” I said, little knowing how apt that would be. I’m glad for everything I have done with my family. Climbing mountains, scaling cliffs, travelling afar, and even the predictable summer trips to the beach.

Some of these adventures were quite hard, and in the moment I wondered to myself “what the heck were you thinking?” In the end, I regretted none of it, and we all have lifelong memories we share.

Before she was killed by cancer, Amy Ettinger wrote:

I’ve always tried to say yes to the voice that tells me I should go out and do something now, even when that decision seems wildly impractical … Money always comes back, but if you miss out on an experience, the opportunity may never come back.

I am trying to pack as much climbing, and eating out, and walks to the cafe, and evening date nights into my life as I can, before the start of treatment. It’s too late for anything big, but these are little things that bring me joy that may become harder to do, after.

My surgery date is set now, and the procedure will mark an abrupt decline and then the start of a long slow climb back up to whatever “new normal” my body can fashion from my reconfigured plumbing. Some people have great results, some people have terrible ones.

As always, there’s no way to know, the grey area is omnipresent, which is perhaps why I sound so morose.

Talk to you again soon, inshalla.

April 16, 2024 12:00 AM

April 15, 2024

The first quarter of my season has been challenging. I've had to deal with injuries and other niggles, and I'm just starting to feel better when I run. Moving forward on fitness while not being able to run very much has been an interesting problem to work on.

As I mentioned in Preason running I started my 8 week block of interval workouts with nagging knee pain. This pain continued for 6 weeks. I dealt with it by alternating outdoor runs with low-impact sessions on an elliptical or stair-stepper machine. I did one outdoor session of hill intervals and one indoor session of stair-stepper intervals every week. By the end of the block, I was doing 36 minutes of hard uphill running, and 4 hours of easier running or stepping in a week. It's not where I want to be. At least I didn't have to skimp on the hard intervals. I'm satisfied with doing as much hard running as my knee allowed, and enjoy feeling more fit.

At the end of last year, I was determined to get some physical therapy and rehabilitate my ankles and feet. I've been visiting a local clinic once a month and have been diligent about doing the recommended exercises. The therapist says that I have good range of motion in my ankles, though there is an imbalance; my right ankle has excellent mobility while the left is only better than average. My bigger problem, in the therapist's view, was that my toes and feet are weak. I needed to build muscle so that I can do toe stands easily and lift my arches. So, I've been going to the gym to build muscle three times a week. I do sets of back squats (5 x 5) for overall strength, and then do sets (3 x 10) of single-leg calf raises on a step with a kettlebell, single-leg squats with toe taps using a barbell and band around my thighs, and single-leg deadlifts with dumbbells. The Three Amigos, as I've been calling these single-leg exercises, have been working for me. My feet and lower legs are stronger and their imbalances are getting ironed out. I feel almost equally good with the deadlifts now, wobbling just one time out of ten, at most, on my left leg. The therapist has me progressing to single-leg jumping now, and I'm feeling better balance with the new exercises, too.

Consistent strength training, conservative running, and changing the way I sit at work seem to have let my knee recover. I'm standing, sitting on a stool, and reclining more when I work, using a conventional office chair less, and at maximum height when I do.

A radiology visit in December revealed that I'm developing a bone spur on my right heel. I wonder if this is yet another symptom of imbalance in my feet and legs, more stress on my right foot caused by favoring my weaker left? I'm getting some consultation on this and meanwhile am icing regularly. Two weeks ago I had to stop running for 3 days to treat aggravation of my right sciatic nerve. It was a good reminder to be more diligent about stretching and foam rolling. Otherwise, I'm doing pretty well. Heart palpitations are behind me. I'm eating and sleeping well, keeping sinus infections at bay, and enjoying longer days and generally nice spring weather.

I'm grateful to be able to continue training and am looking forward to a productive block of tempo running.

by Sean Gillies at April 15, 2024 09:28 PM

April 14, 2024

Before I joined the population of fellow cancer travellers, I had the same simple linear understanding of the “process” that most people do.

You get diagnosed, you get treatment, it works or it doesn’t.

What I didn’t appreciate (and this will vary from cancer to cancer, but my experience is with colorectal) is how little certainty there is, and how wide the grey areas are.

Like, in my previous post, I said I was “diagnosed” with cancer. Which maybe made you think I have it. But that’s not how it works. I had a colonoscopy, and a large polyp was removed, and that polyp was cancerous, and a very small part of it could not be excised. So it’s still in me.

Do I have cancer? Maybe! I have a probability of having live cancer cells in me that is significantly higher than zero. But not as high as one.

How bad is what I have? This is also a game of probabilty. Modern technology can shave off the edges of the distribution, but it can’t quite nail it down.

A computed tomography (CT) scan didn’t show any other tumors in my body, so that means I probably don’t have “stage 4” (modulo the resolution of the scan), which is mostly incurable (though it can be manageable), where the cancer has managed to spread outside the colon.

An MRI didn’t show any swollen lymph nodes, which means I maybe do not have “stage 3”, which requires chemotherapy, because the cancer has partially escaped the colon. But MRI results are better at proving rather than disproving nodal involvement and people report having surgical results that run counter to the MRI all the time.

That leaves me (theoretically) at “stage 2”, looking at a surgical “cure” that involves removing the majority of my rectum and a bunch of lymph nodes. At that point (after the major life-altering surgery!) the excised bits are sent to a pathologist, and the probability tree narrows a little more. Either the pathologist finds cancer in the nodes (MRI was wrong), and I am “upstaged” to stage 3 and sent to chemotherapy, or she doesn’t and I remain a stage 2 and move to a program of monitoring.

In an exciting third possibility, the pathologist finds no cancer in the lymph nodes or the rectum, which means I will have had major life-altering surgery to remove… nothing dangerous. My surgeon says I should find this a happy result (no cancer!) which is probably because he’s seen so many unhappy results, but it’s a major surgery with life-long side effects and I would do almost anything to not have to have it.

Amazingly, despite our modern technology there’s just no way to know for sure if there are still live cancer cells in me short of taking the affected bits out and doing the pathology. Or waiting to see if something grows back, which is to flirt with a much worse prognosis.

Monitoring will be regular blood tests, annual scans and colonoscopies for several years, as the probability of recurrence slowly and asymptotically moves toward (but never quite arrives at) zero. And all those tests and procedures have their own error rates and blind spots.

There are no certainties. All the measuring and cutting and chemicals, and I will still have not driven the cancer entirely out, it will stubbornly remain as a probability, a non-zero ghost haunting me every year of the rest of my hopefully long life.

And of course worth mentioning, I am getting the snack-sized, easy-mode version of this experience! People in stage three or stage four face a probability tree with a lot more “and then you probably die in a few years” branches, and the same continuous reevaluation of that tree, with each new procedure and scan, each new discovery of progression or remission.

Talk to you again soon, inshalla.

April 14, 2024 12:00 AM

April 13, 2024

April 12, 2024

logo del proyecto

Es con gran placer que informamos que el equipo ganador por Colombia de la edición 2023 del concurso Proyectos con Estudiantes y gvSIG Batoví fue seleccionado para el Programa de entrenamiento en el uso pedagógico de las TIC – Convocatoria 2024

Como resultado, el proyecto viaja a Corea del Sur.

Postulación al programa ICT Training for Colombian Teachers 2024: Estrategia desarrollo sostenible, turismo y cartografia en Choachí.

Nos llena de orgullo saber que la iniciativa del Curso – Concurso Geoalfabetización mediante la utilización de Tecnologías de la Información Geográfica (que en el año 2023 tuvo por primera vez participantes fuera de Uruguay) permita que un proyecto desarrollado en Colombia (y que ameritó haber sido declarado ganador del concurso) dé a conocer la experiencia aún más internacionalmente.

el equipo colombiano ganador con los diplomas del concurso Proyectos de Geografía con estudiantes y gvSIG Batoví

Felicitamos a la profesora Astrid Corredor por el logro obtenido. Estos resultados son los que nos convencen cada día de continuar con la iniciativa del curso-concurso para seguir difundiendo el uso de las Tecnologías Libres de Información Geográfica como herramientas de enseñanza y de generación de conocimiento.

vista del municipio de Choachí desde el páramo

by gvsigbatovi at April 12, 2024 07:24 PM

April 11, 2024

April 10, 2024

A little over a month ago, three days after my 53rd birthday, I received a diagnosis of rectal cancer. Happy birthday to me.

Since then, I have been wrestling with how public to be about it. I have a sense that writing is good for me. But it also keeps like milk. I wrote most of this a couple weeks ago and my head space has already evolved.

So writing like this is mostly a work of self-absorption (I’m sure you can forgive me) but hopefully it also helps to raise awareness amongst the cohort of people who might know me or read this.

Colorectal cancer rates are going up, and the expected age of occurance is going down. Please get screened. No matter your age, ask your clinician for a “FIT test”. If you’re over 45, just ask for a colonoscopy, the FIT test isn’t perfect.

I have a pretty good prognosis, mostly because my case was caught by screening, not by experiencing symptoms bad enough to warrant a trip to the doctor. Most of the people who get diagnosed after showing symptoms have it worse than I, and will have a longer, harder road to recovery. Get screened.

Our language of cancer borrows a bit from the language of contagion. I “got” cancer. It’s not quite a neutral description, there’s a hint of agency in there, maybe I did something wrong? This article drives me crazy, the author “went vegan and became a distance runner” after his father died of colorectal cancer.

Sorry friend, cancer is not something you “get”, and it’s not something you can opt out of with clean living. It’s something that happens to you. Take it from this running, cycling, ocean rowing, rock climbing, healthy eater – driving down the marginal probability of cancer (and heart disease (and depression (and more))) with exercise and diet is its own reward, but you are not in control. When cancer wants you, it will come for you.

Carefree Climbing

This is why you should get screened (right?). It’s the one way to proactively protect yourself. The amazing thing about a colonoscopy is, not only can it detect cancer, but it also prevent it, by removing pre-cancerous polyps. It’s possible that screening could have prevented my case, if I had been screened a few years earlier.

I am now a denizen of numerous Facebook fora for fellow travellers along this life path, and one of the posts last week asked “what do you think cancer taught you”? I am a little too early on the path to write an answer myself, but one woman’s answer struck me.

She said it taught her that control is an illusion.

Before, I had plans. I could tell you I was going to go places, and do things, and when I was going to do them, next month, next season, next year. I was in control. Now, I can tell you what I will be doing next week. Perhaps. The rest is in other hands than mine.

Talk to you again soon, inshalla.

Carefree Camping

April 10, 2024 04:00 PM

April 09, 2024

Cloud-optimized formats are changing how we handle geospatial data, making it easier to access and work with large datasets directly in the cloud. These formats reduce the need to download entire datasets, facilitating quicker and more focused data analysis and visualization. For those interested in the specifics of these advancements, our recent Cloud Optimized Geospatial Formats – Status Report, offers an introduction into the topic, recommendations for usage and an overview of promising formats.

Within this project, we also released a sample of various tiles downloaded from swissSURFACE3D as a single cloud optimized point cloud file and made it accessible also via a potree powered web viewer that demonstrates how one single file can be used for visualization in the web and making accessible for applications like QGIS and QField via the direct access URL .

I would like to thank GeoStandards.ch and SGS to allow us working on this.

We’re keen to hear from you as well. Please share your experiences or additional insights and formats in the comments.

by Matthias Kuhn at April 09, 2024 05:04 AM

April 08, 2024

April 07, 2024

April 06, 2024

As I get one year wiser, I want to share something from my past. I used to live in Toulouse, in the southwest part of France. Property development is huge there, but sometimes, in the middle of the new neighbourhood, we keep remains of the past. The map in Montaudran shows the former starting point of the postal service l’aéropostale. The short part of the runway is preserved during this ongoing Uban renewal.

The area will host the Aeroposace campus, which will be the future base of the Galileo satellite navigation system.

Below is a picture of the runway from Wikipedia:

And the next one taken in 2023

MapsintheWild L’aéropostale

by Arnaud at April 06, 2024 10:00 AM

April 05, 2024

April 04, 2024

Focused on stability and usability improvements, most users will find something to celebrate in QField 3.2

Main highlights

This new release introduces project-defined tracking sessions, which are automatically activated when the project is loaded. Defined while setting up and tweaking a project on QGIS, these sessions permit the automated tracking of device positions without taking any action in QField beyond opening the project itself. This liberates field users from remembering to launch a session on app launch and lowers the knowledge required to collect such data. For more details, please read the relevant QField documentation section.

As good as the above-described functionality sounds, it really shines through in cloud projects when paired with two other new featurs.

First, cloud projects can now automatically push accumulated changes at regular intervals. The functionality can be manually toggled for any cloud project by going to the synchronization panel in QField and activating the relevant toggle (see middle screenshot above). It can also be turned on project load by enabling automatic push when setting up the project in QGIS via the project properties dialog. When activated through this project setting, the functionality will always be activated, and the need for field users to take any action will be removed.

Pushing changes regularly is great, but it could easily have gotten in the way of blocking popups. This is why QField 3.2 can now push changes and synchronize cloud projects in the background. We still kept a ‘successfully pushed changes’ toast message to let you know the magic has happened 🚀

With all of the above, cloud projects on QField can now deliver near real-time tracking of devices in the field, all configured on one desktop machine and deployed through QFieldCloud. Thanks to Groupements forestiers Québec for sponsoring these enhancements.

Other noteworthy feature additions in this release include:

  • A brand new undo/redo mechanism allows users to rollback feature addition, editing, and/or deletion at will. The redesigned QField main menu is accessible by long pressing on the top-left dashboard button.
  • Support for projects’ titles and copyright map decorations as overlays on top of the map canvas in QField allows projects to better convey attributions and additional context through informative titles.

Additional improvements

The QFieldCloud user experience continues to be improved. In this release, we have reworked the visual feedback provided when downloading and synchronizing projects through the addition of a progress bar as well as additional details, such as the overall size of the files being fetched. In addition, a visual indicator has been added to the dashboard and the cloud projects list to alert users to the presence of a newer project file on the cloud for projects locally available on the device.

With that said, if you haven’t signed onto QFieldCloud yet, try it! Psst, the community account is free 🤫

The creation of relationship children during feature digitizing is now smoother as we lifted the requirement to save a parent feature before creating children. Users can now proceed in the order that feels most natural to them.

Finally, Android users will be happy to hear that a significant rework of native camera, gallery, and file picker activities has led to increased stability and much better integration with Android itself. Activities such as the gallery are now properly overlayed on top of the QField map canvas instead of showing a black screen.

by Mathieu at April 04, 2024 07:58 AM

GeoSpatial Techno is a startup focused on geospatial information that is providing e-learning courses to enhance the knowledge of geospatial information users, students, and other startups. The main approach of this startup is providing quality, valid specialized training in the field of geospatial information.

( YouTube | LinkedIn | Facebook | X )


Using GeoServer and QGIS to style a layer

In this session, we will explore “How to style layers using GeoServer and QGIS” to produce beautiful maps. If you want to access the complete tutorial, simply click on the link

Introduction

Geospatial data has no intrinsic visual component and it must be styled to be visually represented on a map. By default, GeoServer uses a markup language called Styled Layer Descriptor (SLD) to define styling rules for displaying data. SLD is an XML-based language that allows users and software to control the visual portrayal of geospatial data. This language ensures that clients and servers can both understand how to render the data visually.

Note. This video was recorded on GeoServer 2.20.0, which is not the most up-to-date version. Currently, versions 2.24.x and 2.25.x are supported. To ensure you have the latest release, please visit geoserver.org and avoid using older versions of GeoServer.

Add a Style

To add a new style, navigate to the Data > Styles page, then click on the Add a new style link. You will be redirected to the new style page, which is the same as the Style Editor Data tab.

This tab includes basic style information, the ability to generate a style and legend details. It has some mandatory basic style information, such as:

  • Name: It’s the name of the style and it must be a unique name.
  • Workspace: Styles can be inside workspaces which causes restrictions. In other words, the styles in a workspace can only be assigned to the services of that, and other services outside it, cannot use these styles. Styles also can be “global” or no workspace, so they don’t have any restrictions and services can be used for all suitable styles.
  • Format: Default options are SLD and ZIP formats. To use other formats such as CSS and YSLD, you should download and install extensions. Make sure to match the version of the extension to the version of the GeoServer.

The “Style Content” area provides options for creating, copying, or uploading a style. It has three options:

  • Generate a default style: Choose a generic style based on geometry such as Point, Line, Polygon, Raster, or Generic and click the Generate link when selected.
  • Copy from existing style: Select an existing style from GeoServer and copy its contents to the current style. Note that not all styles may be compatible with all layers. Click the Copy link when selected.
  • Upload a style file: Press the Browse button to locate and select a plain text file from your local system to add as the style. Click on the Upload link to add the style file.

The Legend area allows you to preview the legend for the style. Click on the Preview legend link to generate a legend based on the current settings.

At the bottom of the Style Editor page, you’ll find several options: Validate, Apply, Save and Cancel. During editing and especially after editing is complete, you can check the validation of the syntax by pressing the Validate button at the bottom. If any validation errors are found, a red message is displayed, and if no errors are found, a green message is displayed. To make changes, press the Apply button to access all the tabs and finally press the Save button.

After having created the style, it’s time to apply it to the layer. To do it, follow these steps:

  • Navigate to the Data > Layers page then click on the layer’s name link to open the layer’s properties form. Switch to the Publishing tab.
  • Go to the Style section and from the Default Style list, select the suitable style, then press the Save button.
  • Navigate to the **Data > Layer Preview ** page and open up OpenLayers preview for the layer.

Edit a Style

On the Styles page, click on the style name to open the Style Editor. The Style Editor page presents the style definition and contains four tabs with many configuration options: Data , Publishing , Layer Preview and Layer Attributes.

  • Data tab: The Data tab includes basic style information, the ability to generate a style, and legend details. Moreover, it allows for direct editing of style definitions at the bottom, with support for line numbering, automatic indentation, and real-time syntax highlighting. You can switch between tabs to create and edit styles easily and can adjust the font size of the editor.
  • Publishing tab: This tab shows all layers available on the server, along with their default style and any additional styles they may have. You can easily see which layers are linked to the current style by checking a box in the table.
  • Layer Preview tab: This tab enables you to preview and edit the current style of any layer without switching pages. You can easily select the desired layer to preview and fine-tune styles to continuously test visualization changes.
  • Layer Attributes tab: The Layer Attributes tab shows a list of attributes for the selected layer, making it easy to see and work with the attributes associated with the layer. This can help in deciding which attribute to use for labeling or setting up scale-dependent rules.

Creating SLD styles by QGIS

QGIS has a style editor for map rendering with various possibilities, including the export of raster styles to SLD for use in GeoServer. For versions before 3.4.5, a plugin called SLD4raster is required for exporting SLD for use in GeoServer.

Here’s a simple guide to styling a vector layer in GeoServer:

  • Open QGIS (minimum version 3.0) and loading the vector dataset into your project.
  • Double click on the layer to open the Properties dialog and navigate to the Symbology page.
  • Select a Graduated rendering, choose the desired column, and press the Classify button.
  • Return to the Properties dialog and go to the bottom of the Styles page. Select Style > Save Style.
  • Save the style in SLD format and choose the location for the file.
  • Use the Choose File button to locate your exported file in the folder and select it.
  • Click on the Upload link to load the file into the editor form.
  • Press the Validate button to ensure there are no errors, then press the Save button.
  • Switch to the Publishing tab and choose either Default or Associated checkbox to apply the new style to the desired layer.

Here is a step by step guide to style a raster layer for GeoServer:

  • Begin by opening QGIS with a minimum version of 3.4.5.
  • Load the raster layer into your project.
  • Double click on the layer to access the Properties and go to the Symbology tab.
  • Select Singleband pseudocolor as the Render type, choose Linear method for Interpolation, and select a desired Color ramp.
  • Press the Classify button to create a new color classification, then press the Apply button to save this classification. At the bottom-left of the page, choose Style and press Save Style button.
  • Choose a name and export it in SLD format to your preferred location.
  • In GeoServer, navigate to the Style section and click on Add a new style to open the editor form.
  • Use the Choose File button to locate your exported file in the folder and select it.
  • Click on the Upload link to load the file into the editor form.
  • Validate the style by pressing the Validate button to ensure there are no errors, then press the Save button.
  • Navigate to Data > Layers page and open the layer’s properties form by clicking on the layer’s name. Switch to the Publishing tab.
  • Set the style as Default Style and press the Save button.
  • Finally, in the Layer Preview section, open the OpenLayers preview for the raster layer.

Remove a Style

To remove a style, click on the checkbox next to the style. Multiple styles can be selected at the same time. Press the Remove selected style(s) button at the top of the page. You will be asked for confirmation and press the OK button to remove the selected style(s).

In this session, we explored “How to style layers using GeoServer and QGIS” to produce beautiful maps. If you want to access the complete tutorial, simply click on the link

by Milad Rafiei at April 04, 2024 12:00 AM

April 03, 2024

April 02, 2024