3dstreet icon indicating copy to clipboard operation
3dstreet copied to clipboard

starter doc for integration with other systems

Open kfarr opened this issue 2 years ago β€’ 1 comments

Currently 3DStreet can create a new scene using a JSON representation of a "right of way" of street segments from left to right generated by the Streetmix API response, such as: https://streetmix.net/api/v1/streets/763d8b20-e519-11eb-9f95-39e599c09049

As a developer of a platform similar to but different than Streetmix, I would like to be able to export scenes from my application into 3DStreet for the creation of 3D scenes and plan view images.

This doc could include might include:

  • a bit more info about the expected json that we currently support for parsing
  • basic guidance on where / how this response is parsed by 3dstreet
  • an example of how to provide a URL for this response
  • some instructions on how to test

kfarr avatar Jan 18 '24 21:01 kfarr

Thinking through some of the needs for StreetPlan and how they could do a step by step approach to integrate with 3DStreet:

  • a version 1 could be for a given streetplan street, output a text file (or allow a file to be downloaded) that has a name (however you store it in your database) of each of the street segments from left to right; also a number to represent the width of this segment type

QA:

  • Make a 1-item street

What is example of the simplest JSON that is compliant (can be parsed by) 3DStreet:

Example with 1 segment (modified from this streetmix API response):


{
  "name": "example",
  "data": {
    "street": {
      "segments": [
        {
          "type": "sidewalk-tree",
          "variantString": "",
          "width": 10,
        }
      ],
    }
  },
}

Example with 2 segments:

{
  "name": "example",
  "data": {
    "street": {
      "segments": [
        {
          "type": "sidewalk-tree",
          "variantString": "",
          "width": 10,
        },
        {
          "type": "drive-lane",
          "variantString": "",
          "width": 10,
        }
      ],
    }
  },
}

kfarr avatar Jan 25 '24 18:01 kfarr