• Documentation
  • Core API
  • SmartOpenHamburg API
  • Model Components API
  • Common API
Search Results for

    Show / Hide Table of Contents
    • MARS DSL Language
    • MARS Runtime System
      • Getting started with MARS
      • Basic Concepts
        • Multi-Agent-Simulation
        • Agents
        • Layers
        • Entities
        • Environments
          • SpatialHashEnvironment
          • GeoHashEnvironment
          • SpatialGraphEnvironment
          • CollisionEnvironment
        • Model Setup
      • Model Configuration
        • Agent and Entity Configuration
        • Layer Configuration
        • Output Filter
        • Simulation Configuration Options
        • Simulation Output Formats
      • Data Sources
        • Geospatial Data Sources
        • Geospatial Data Types
        • ASCII grid (.asc)
        • CSV
        • Time-series Data
      • Analysis and Visualization
        • Visualizing Agent Movement Trajectories
        • Simple Live Visualization
        • Analyzing Output Data
      • Tutorials
        • Creating a new MARS C# project
        • Creating a starting point for your model
        • Creating vector and raster layer files
        • Building your first model (wolf-sheep-grass)
        • Common problems and solutions
        • Acquire geo data for layers
        • Build and start your model in Kubernetes cluster
    • SmartOpenHamburg
      • Quick Start
      • Ready to use scenarios (boxes)
        • Ferry Transfer
        • Green4Bikes
        • Results
        • Result Schemas
      • Layer
        • Multimodal Layer
        • Modal Layer
        • Scheduling Layer
        • Vector Layer
      • Agents
        • Behaviour Model
        • Multimodal
        • Multi-Capable
        • Multi-Modality
        • Citizen
        • Traveler
      • Entities
        • Referencing
        • Street Vehicles
        • Bicycle Vehicles
        • Ferry

    Geospatial Data Types

    The MARS runtime system is able to work with process geoinformation and geodata in multiple formats. Upon execution of a simulation, the data stored in such files are converted to graphs, consisting of nodes and edges.


    GeoJSON

    GeoJSON is a format for encoding a variety of geographic data structures. Typically, a set of data structures is held within a FeatureCollection made up of Features:

    { "type": "FeatureCollection",
      "features": [
        { "type": "Feature",
          "geometry": {"type": "Point", "coordinates": [102.0, 0.5]},
          "properties": {"prop0": "value0"}
        },
        { "type": "Feature",
          "geometry": {
            // insert geometry types here
          }
        },
        { "type": "Feature",
          "geometry": {
            // insert geometry types here
          }
        }
      ]
    }
    

    Below is a description of the geometry types supported in GeoJSON:

    Point: a single point on a coordinate system.

    Example:

    { "type": "Point",
        "coordinates": [30, 10]
    }
    

    LineString: a set of points connected by lines.

    { "type": "LineString",
        "coordinates": [
            [30, 10], [10, 30], [40, 40]
        ]
    }
    

    The key coordinates contains a set of points, each of which connects to the one listed before it.


    Polygon: a set of points connected by lines that form a closed shape.

    { "type": "Polygon",
        "coordinates": [
            [[35, 10], [45, 45], [15, 40], [10, 20], [35, 10]],
            [[20, 30], [35, 35], [30, 20], [20, 30]]
        ]
    }
    

    This is an example of a polygon within a polygon, creating a cut-out within the outer polygon. It is also possible to create a single filled-out polygon.


    MultiPoint: a set of multiple unconnected points.

    { "type": "MultiPoint",
        "coordinates": [
            [10, 40], [40, 30], [20, 20], [30, 10]
        ]
    }
    

    MultiLineString: a set of multiple lines made up of multiple points.

    { "type": "MultiLineString",
        "coordinates": [
            [[10, 10], [20, 20], [10, 40]],
            [[40, 40], [30, 30], [40, 20], [30, 10]]
        ]
    }
    

    MultiPolygon: a set of polygons.

    { "type": "MultiPolygon",
        "coordinates": [
            [
                [[40, 40], [20, 45], [45, 30], [40, 40]]
            ],
            [
                [[20, 35], [10, 30], [10, 10], [30, 5], [45, 20], [20, 35]],
                [[30, 20], [20, 15], [20, 25], [30, 20]]
            ]
        ]
    }
    

    Here are examples of how these geometry types are represented visually:

    Point LineString Polygon MultiPoint MultiLineString MultiPolygon
    geojson_point geojson_linestring geojson_polygon2 geojson_multipoint geojson_multilinestring geojson_multipolygon


    For more information on GeoJSON, please visit https://tools.ietf.org/html/rfc7946 or https://datatracker.ietf.org/wg/geojson/charter/.


    GraphML

    GraphML is an XML-based data format for representing graphs. For example, MARS can use geodata from a GraphML file to populate a VectorLayer or other layer type for agents to move on.

    GraphML files that contain geodata can be generated using ODDI or osmnx. A useful tutorial on how to work with osmnx can be found here.

    Note: GraphML cannot be visualized in QGIS.


    Shapefile

    Shapefile is a geospatial vector data format for GIS software that is also used within MARS runtime system models. They consist of multiple files, three of which are mandatory:

    1. .shp: shape format; the feature geometry itself
    2. .shx: shape index format; a positional index of the feature geometry to allow seeking forwards and backwards quickly
    3. .dbf: attribute format; columnar attributes for each shape, in dBase IV format

    For more information on Shapefile specifications, please see the ESRI technical description.


    Geopackage

    GeoPackage is an open, standards-based, platform-independent, portable, compact format for transferring geospatial information. It contains data and geodata in a SQLite database file. For more information, please see the Geopackage homepage.

    In This Article
    Back to top © 2022 MARS GROUP