Skip to content

Artefacts in output when tessellating islands with narrow channels #718

@jontwo

Description

@jontwo

Describe the problem

Running morphological_tessellation on some island coastlines, there were some strange artefacts in the output where the channel was <100m wide.

Input island coastlines.

Image

Tessellation output overlaid on the coastlines, the narrow point is around 60m wide.

Image

Steps to reproduce

import geopandas
import momepy

coastline = "path/to/coastline.shp"
polygons = "path/to/output.shp"

coast_gdf = geopandas.read_file(coastline).reset_index(drop=True)
result = momepy.morphological_tessellation(coast_gdf, segment=500, shrink=20)
result.to_file(polygons)

Versions of your packages

python=3.12.11
momepy=0.9.1
geopandas=1.1.1
libpysal=4.13.0
networkx=3.5

Your operating system

Ubuntu 22.04.5 LTS

Additional context

Having reread the doc, I can see the values we were using for segment and shrink are way off the default values. They had been working for us up to that point. When I lowered the segment value to 100, the issue went away.

So, you can probably close this issue as being user error, but could I ask for a clarification in the docs? Both segment and shrink represent a distance, but is this map units? I'm assuming it is, but it would be good to clarify it, as it could be pixels or something else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions