[GRASS-git] [OSGeo/grass-addons] 9e5fa5: v.in.osm: import polygon layers as areas and repro...

Yann Chemin noreply at github.com
Tue Sep 29 16:58:54 PDT 2026


  Branch: refs/heads/grass8
  Home:   https://github.com/OSGeo/grass-addons
  Commit: 9e5fa5e1d0c613111080aa9f6a42fcbf01b30a4f
      https://github.com/OSGeo/grass-addons/commit/9e5fa5e1d0c613111080aa9f6a42fcbf01b30a4f
  Author: Yann Chemin <dr.yann.chemin at gmail.com>
  Date:   2026-09-29 (Tue, 29 Sep 2026)

  Changed paths:
    A src/vector/v.in.osm/tests/conftest.py
    A src/vector/v.in.osm/tests/data_small.osm
    A src/vector/v.in.osm/tests/v_in_osm_test.py
    M src/vector/v.in.osm/v.in.osm.html
    M src/vector/v.in.osm/v.in.osm.md
    M src/vector/v.in.osm/v.in.osm.py

  Log Message:
  -----------
  v.in.osm: import polygon layers as areas and reproject to project CRS (#1863)

Polygon layers (e.g. multipolygons from an OSM/PBF file or
planet_osm_polygon from osm2pgsql) were passed through v.split and
v.build.polylines like line layers, so multipolygon rings ended up as
plain lines and no areas were built. They are now imported directly with
v.in.ogr as boundaries and centroids.

The type option is now matched to the layer geometry: with the default
point,line,boundary,centroid, v.in.ogr also imported linestrings of line
layers as boundaries. Asking for a type the layer cannot provide (e.g.
only lines from a polygon layer) is a fatal error.

The data were never reprojected; -o only skipped the projection check,
so OSM lat/lon coordinates were written unchanged into projected
projects. The selected features (after the where filter) are now
reprojected with GDAL to the current project CRS through a temporary
GeoPackage. -o keeps the previous behaviour.

Adds pytest tests (tests/) on a small synthetic .osm file and updates
the documentation.

The changes and tests were written with the help of an AI assistant
(Claude), reviewed and tested by the submitter.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass-addons/settings/notifications


More information about the grass-commit mailing list