Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

swh:1:snp:5003547be900b444c1ef0046c77da9881998af06
  • Code
  • Branches (0)
  • Releases (8)
    • Branches
    • Releases
      • 8
      • 8
      • 7
      • 6
      • 5
      • 4
      • 3
      • 2
      • 1
    • 18e7418
    • /
    • c2g-dev-city2graph-44be042
    • /
    • CHANGELOG.md
    Raw File Download

    To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
    Select below a type of object currently browsed in order to display its associated SWHID and permalink.

    • content
    • directory
    • snapshot
    • release
    content badge
    swh:1:cnt:9bcc58676bad23a72bfe7ddb0f0c0d54ee4e1d42
    directory badge
    swh:1:dir:f0e9629770f24b6869d6ccb6b724a37fe883a067
    snapshot badge
    swh:1:snp:5003547be900b444c1ef0046c77da9881998af06
    release badge
    swh:1:rel:e0312eb27db50cddb4557564f00991f0a62dfbf6

    This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
    Select below a type of object currently browsed in order to generate citations for them.

    • content
    • directory
    • snapshot
    • release
    Generate software citation in BibTex format (requires biblatex-software package)
    Generating citation ...
    Generate software citation in BibTex format (requires biblatex-software package)
    Generating citation ...
    Generate software citation in BibTex format (requires biblatex-software package)
    Generating citation ...
    Generate software citation in BibTex format (requires biblatex-software package)
    Generating citation ...
    CHANGELOG.md
    # Changelog
    
    All notable changes to this project will be documented in this file.
    
    The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
    and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
    
    ## 0.1.5 (2025-09-19)
    
    ### Added
    - Added `contiguity_graph`
    - Added `group_nodes`
    
    ### Changed
    - Improved computation efficiency in `_add_edges`
    
    ### Changed
    - N/A
    
    ### Fixed
    - Fixed the issue [#30](https://github.com/c2g-dev/city2graph/issues/30)
    - Fixed the issue [#31](https://github.com/c2g-dev/city2graph/issues/31)
    
    ### Documentation
    - Added examples of `contiguity_graph` and `group_nodes` in https://city2graph.net/examples/generating_graphs_by_proximity.ipynb
    
    
    
    ## 0.1.4 (2025-09-16)
    
    ### Added
    - Added `od_matrix_to_graph`
    
    ### Changed
    - N/A
    
    ### Fixed
    - N/A
    
    ### Documentation
    - Added examples of `od_matrix_to_graph` in https://city2graph.net/examples/generating_graphs_from_od_matrix.ipynb
    
    ## 0.1.3 (2025-09-14)
    
    ### Added
    - Added `contiguity_graph`
    
    ### Changed
    - Updated dependent packages and tools
    
    ### Fixed
    - Fixed issues in `_directed_graph`
      - [`#30`](https://github.com/c2g-dev/city2graph/issues/30)
      - [`#31`](https://github.com/c2g-dev/city2graph/issues/31)
    
    ### Documentation
    - Added examples of `contiguity_graph` in https://city2graph.net/examples/generating_graphs_by_proximity.html
    
    ## 0.1.2 (2025-07-17)
    
    ### Added
    - GitHub issue templates for bug reports and feature requests.
    - Pull request template for better contribution workflow.
    - Enhanced test coverage with improved test codes across all modules.
    - New example notebooks in documentation including morphological graph examples.
    
    ### Changed
    - Updated `morphological_graph()` function to accept MultiGraph inputs (e.g., from OSMnx) with bug fix.
    - Enhanced `utils.py` module with improved compliance and functionality.
    - Updated PyTorch dependencies to support newer CUDA versions (cu126, cu128).
    - Improved documentation structure and content across multiple files.
    - Updated uv dependency management configuration.
    
    ### Fixed
    - Fixed edge index data types in `public_to_public_graph()` function.
    - Fixed HTML title in documentation.
    - Fixed CUDA version examples in documentation.
    - Updated pre-commit configuration for better code quality.
    
    ### Documentation
    - Added new badges and improved documentation presentation.
    - Enhanced installation instructions with clearer CUDA support information.
    - Updated example notebooks with more comprehensive demonstrations.
    - Improved API documentation and descriptions.
    
    ## 0.1.1 (2025-07-12)
    
    ### Added
    - Added conda-forge support.
    - Added DOI badge and citation file reference for easier academic referencing.
    - Improved documentation in `docs/source/index.rst` with clearer citation instructions and BibTeX example.
    
    ### Changed
    - Minor formatting and content updates in documentation for clarity.
    
    ## 0.1.0 (2025-07-10)
    
    ### Changes
    
    #### Core Features
    - **Data Loading Module (`city2graph.data`)**: Comprehensive functionality for loading and processing geospatial data from various sources
      - Support for Overture Maps data integration
      - Data validation and coordinate reference system management
      - Geometric processing operations for urban network analysis
      - `load_overture_data()` and `process_overture_segments()` functions
    
    - **Graph Conversion Module (`city2graph.graph`)**: Convert between GeoDataFrames and PyTorch Geometric objects
      - Seamless integration with Graph Neural Networks (GNNs)
      - Support for heterogeneous graph structures
      - PyTorch tensor conversion for machine learning workflows
    
    - **Morphological Analysis Module (`city2graph.morphology`)**: Create morphological graphs from urban data
      - Private-to-private adjacency relationships between building tessellations
      - Public-to-public topological connectivity between street segments
      - Private-to-public interface relationships between private and public spaces
      - `morphological_graph()`, `private_to_private_graph()`, `private_to_public_graph()`, and `public_to_public_graph()` functions
    
    - **Proximity Networks Module (`city2graph.proximity`)**: Generate graph networks based on spatial proximity relationships
      - Multiple proximity models (Euclidean, Manhattan, network-based distances)
      - Support for Delaunay triangulation, k-nearest neighbors, and radius-based networks
      - `bridge_nodes()` and other proximity-based graph generation functions
    
    - **Transportation Networks Module (`city2graph.transportation`)**: Process GTFS data and create transportation networks
      - General Transit Feed Specification (GTFS) data processing
      - Public transit network representations
      - Origin-destination pair analysis
      - `get_od_pairs()`, `load_gtfs()`, and `travel_summary_graph()` functions
    
    - **Utility Functions Module (`city2graph.utils`)**: Core utilities for graph conversion and validation
      - Graph conversion between different formats (NetworkX, GeoDataFrames, PyTorch Geometric)
      - Tessellation creation and dual graph operations
      - Distance filtering and validation utilities
    
    #### Installation Options
    - **Multiple PyTorch Installation Variants**: Support for different hardware configurations
      - Basic installation without PyTorch: `pip install city2graph`
      - CPU version: `pip install "city2graph[cpu]"`
      - CUDA support: `pip install "city2graph[cu118]"`, `pip install "city2graph[cu124]"`, `pip install "city2graph[cu126]"`, `pip install "city2graph[cu128]"`
    
    #### Development Environment
    - **Development Setup**: Comprehensive development environment using `uv`
      - Development dependencies including IPython, Jupyter, pytest, and testing tools
      - Jupyter kernel integration for interactive development
      - Pre-commit hooks and code formatting tools (isort, ruff)
    
    - **Docker Support**: Complete Docker Compose setup
      - Jupyter notebook server with all dependencies pre-installed
      - GPU support when available
      - Mounted volumes for data and notebooks
    
    #### Documentation and Examples
    - **Comprehensive Documentation**: Detailed documentation available at https://city2graph.net
    - **Example Notebooks**: Development notebook (`dev/dev.ipynb`) for testing and examples
    - **API Documentation**: Complete docstring coverage for all public functions
    
    #### Testing and Quality Assurance
    - **Test Suite**: Comprehensive test coverage with pytest
      - Unit tests for all modules: `test_data.py`, `test_graph.py`, `test_morphology.py`, `test_proximity.py`, `test_transportation.py`, `test_utils.py`
      - Test data and utilities in `tests/data/` and `tests/utils/`
      - Code coverage reporting with codecov integration
    
    - **Code Quality**:
      - Ruff linting and formatting
      - Type hints and static analysis
      - BSD-3-Clause license compliance
    
    #### Dependencies
    - **Core Dependencies**:
      - NetworkX ≥2.8 (graph operations)
      - OSMnx ≥2.0.3 (OpenStreetMap integration)
      - Shapely ≥2.1.0 (geometric operations)
      - GeoPandas >0.12.0 (geospatial data handling)
      - libpysal ≥4.12.1 (spatial analysis)
      - momepy (morphological analysis)
      - overturemaps (Overture Maps data)
    
    - **Optional Dependencies**:
      - PyTorch ≥2.6.0 (machine learning backend)
      - PyTorch Geometric ≥2.6.1 (graph neural networks)
      - TorchVision ≥0.21.0 (computer vision utilities)
    
    #### Platform Support
    - **Python Version**: Requires Python ≥3.11, <4.0
    - **Operating Systems**: macOS, Linux, Windows
    - **Architecture**: CPU and GPU (CUDA) support
    
    ### Technical Details
    
    #### Graph Types Supported
    - **Morphological Graphs**: Buildings, streets, and land use relationships
    - **Transportation Graphs**: Public transport networks (buses, trams, trains)
    - **Proximity Graphs**: Spatial contiguity and distance-based relationships
    - **Mobility Graphs**: Bike-sharing, migration, and pedestrian flow networks
    
    #### Data Sources Integration
    - **Overture Maps**: Direct integration with Overture Maps data
    - **GTFS**: General Transit Feed Specification for public transport
    - **OpenStreetMap**: Via OSMnx integration
    - **Custom Geospatial Data**: Support for any GeoDataFrame input
    
    #### Machine Learning Integration
    - **PyTorch Geometric**: Native support for graph neural networks
    - **Tensor Conversion**: Automatic conversion of geospatial data to PyTorch tensors
    - **Heterogeneous Graphs**: Support for multi-type node and edge graphs
    
    ### Repository Structure
    - **Main Package**: `city2graph/` - Core library modules
    - **Tests**: `tests/` - Comprehensive test suite
    - **Documentation**: `docs/` - Sphinx documentation source
    - **Examples**: `dev/` - Development notebooks and examples
    - **Docker**: `Dockerfile` and `docker-compose.yml` for containerized development
    
    ### Links
    - **Documentation**: https://city2graph.net
    - **PyPI Package**: https://pypi.org/project/city2graph/
    - **GitHub Repository**: https://github.com/c2g-dev/city2graph
    - **License**: BSD-3-Clause
    
    ---
    

    back to top

    Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
    The source code of Software Heritage itself is available on our development forge.
    The source code files archived by Software Heritage are available under their own copyright and licenses.
    Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API