Git Product home page Git Product logo

cjio_dbexport's Introduction

CityJSON

GitHub tag (latest SemVer) GitHub license

This repository is where the specifications and the schemas of CityJSON are kept. All previous versions are kept in tags in the commits.

For all the details, see the official CityJSON website: https://cityjson.org.

What is CityJSON?

CityJSON is a JSON-based encoding for a subset of the OGC CityGML data model (version 3.0.0), which is an open standardised data model and exchange format (in GML) to store digital 3D models of cities and landscapes.

The aim of CityJSON is to offer an alternative to the GML encoding of CityGML, which can be verbose and complex (and thus rather frustrating to work with). CityJSON aims at being easy-to-use, both for reading datasets, and for creating them. It was designed with programmers in mind, so that tools and APIs supporting it can be quickly built, and several software have been created already.

Contributing to the project

We invite anyone to contribute to the development and improvement of CityJSON, all discussions, issues, and developments are open to everyone.

If you use CityJSON in an academic context, please cite this article

Ledoux H, Arroyo Ohori K, Kumar K, Dukai B, Labetski A, Vitalis S (2019). CityJSON: A compact and easy-to-use encoding of the CityGML data model. Open Geospatial Data, Software and Standards, 4:4 (DOI) (PDF)

cjio_dbexport's People

Contributors

balazsdukai avatar dependabot[bot] avatar rijos avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

rijos

cjio_dbexport's Issues

ERROR: cannot accumulate arrays of different dimensionality

2020-12-01 15:25:54 cjio_dbexport.db3dnl 73 [ERROR ] Failed to create CityJSON from 1543, check the logs for details.
2020-12-01 15:25:55 cjio_dbexport.db3dnl 265 [ERROR ] 2202E ERROR: cannot accumulate arrays of different dimensionality
CONTEXT: SQL function "cjdb_multipolygon_to_multisurface" statement 1

Export multiple tiles, provided by tile IDs

We store a tile index in the database. The tile index is a rectangular partitioning of the Netherlands, where each partition is a polygon with a unique ID. For example the AHN index. Then the user can give a list of tile IDs that they want to export.

The command below would export the tiles 37fz2, 35dz2, 12df2 into three cityjson files 37fz2.json, 35dz2.json, 12df2.json to the directory path/to/directory.

$ cjio_dbexport tests/data/test_config.yml export --tiles 37fz2 35dz2 12df2 path/to/directory

Then the command below would export all the tiles from the tile index to the directory path/to/directory.

$ cjio_dbexport tests/data/test_config.yml export --tiles all path/to/directory

Add YAML schema validation

Basic validation of the generic required tags in the config file, eg. geometries, database, cityobject_type

Create cityjson from 3dbag dump.

  • cjio_dbexport version: 0.8.8
  • Python version: 3.7.5
  • Operating System: Ubuntu 19.10

Description

I have made a dump of the 3D bag and I am trying now to create a cityjson file with the load22_3d information using the command:

cjdb --log DEBUG ./config.yaml export_bbox 148528.0213 490644.6947 148922.1004 491072.46513 40910000.json

However I am unsure how to connect to the tables pand & lod22_3d.

What I Did

At the moment, every time I want a specific building or area I first join pand and lod22_3d tables and then I create a table with only the buildings of interest. My config file looks like this. Is there a better way to structure the config file to avoid joining the tables?


geometries:
  lod: 2.2
  type: MultiSurface

database:
  dbname: db
  host: localhost
  port: 5432
  user: username
  password: password

tile_index:
  schema: tile_index
  table: tile_index_1
  srid: 7415
  field:
    pk: id
    geometry: geom

cityobject_type:
  Building:
    - schema: bag3d
      table: lod22_3ds_selection
      field:
        pk: fid
        geometry:
          lod22:
            name: geometrie3d
            type: Solid
        cityobject_id: identificatie

Add an option for reading the LoD from a column

In case the table contains features in different LoD, then it is not possible do differentiate between them unless we mark the LoD of the feature explicitly, eg in an extra column. This column need to be treated separately, because I needs to be loaded from the table but not added as a cityobject attribute.

Log to file

Send logs to file and use Click.echo for >Info messages

Export to LandUse

3dnl tables:

  • onbegroeidterreindeel_vlak
  • ondersteunendwaterdeel_vlak
  • ondersteunendwegdeel_vlak
  • overigbouwwerk
  • pand

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.