TROBDB Webservices Upload: Unterschied zwischen den Versionen

Aus Geoinformation HSR
Wechseln zu: Navigation, Suche
(Upload examples)
 
(8 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
 +
=== Fields ===
 +
 +
* Form-Fields:
 +
** input-type: file  |  name: file
 +
** input-type: text  |  name: email
 +
 +
* GeoJSON fields in "properties" array:
 +
** "geom_type": String (Values: "point", "line", "poly")
 +
** "srid": String with srid number
 +
** "userid": String with an identiefier from the source
 +
** "title": String as title for the obstruction
 +
** "description": String as
 +
** "trob_start": String with date and time. Example: "02.03.2014 00:00:00"
 +
** "trob_end": String with date and time. Example: "02.03.2014 00:00:00"
 +
** "direction": String (Values: "both", "as_is", "reverse")
 +
** "country": String with ISO country code
 +
** "reason": String (Values: "other", "construction", "event")
 +
** "object_name": String with street name for example: "A1"
 +
** "object_type": String (Values: "street", "tunnel", "car_transport", "pass", "other",
 +
** "trob_type": String (Values: "closed", "snow", "closed_except_emergency", "closed_for_heavy_load", "obstructed", "other")
 +
 
=== Upload examples ===
 
=== Upload examples ===
  
 +
<nowiki>
 +
{
 +
  "type": "FeatureCollection",
 +
  "features": [
 +
    {
 +
      "type": "Feature",
 +
      "properties": {
 +
    "geom_type": "point",
 +
"srid": "4326",
 +
        "userid": "Id falls vorhanden",
 +
        "title": "Baustelle mit Titel",
 +
        "description": "Beschreibung der Baustelle",
 +
        "trob_start": "02.03.2014 00:00:00",
 +
        "trob_end": "10.08.2014 00:00:00",
 +
        "direction": "both",
 +
        "country": "CH",
 +
        "reason": "other",
 +
        "object_name": "StrassenName",
 +
        "object_type": "street",
 +
        "trob_type": "snow"
 +
      },
 +
      "geometry": {
 +
        "type": "Point",
 +
        "coordinates": [
 +
          7.499745,
 +
          46.894146
 +
        ]
 +
      }
 +
    },
 +
{
 +
  "type": "Feature",
 +
  "properties": {
 +
"geom_type": "line",
 +
"srid": "4326",
 +
"userid": "Id falls vorhanden",
 +
"title": "Baustelle mit Titel",
 +
"description": "Beschreibung der Baustelle",
 +
"trob_start": "02.03.2014 00:00:00",
 +
"trob_end": "10.08.2014 00:00:00",
 +
        "direction": "both",
 +
        "country": "CH",
 +
        "reason": "other",
 +
        "object_name": "StrassenName",
 +
        "object_type": "street",
 +
        "trob_type": "snow"
 +
  },
 +
  "geometry": {
 +
"type": "LineString",
 +
"coordinates": [
 +
  [
 +
9.089196,
 +
47.459519
 +
  ],
 +
  [
 +
9.089595,
 +
47.459551
 +
  ],
 +
  [
 +
9.090497,
 +
47.459699
 +
  ],
 +
  [
 +
9.091234,
 +
47.459805
 +
  ],
 +
  [
 +
9.092256,
 +
47.459843
 +
  ],
 +
  [
 +
9.092337,
 +
47.459863
 +
  ],
 +
  [
 +
9.092452,
 +
47.45989
 +
  ],
 +
  [
 +
9.09265,
 +
47.460003
 +
  ],
 +
  [
 +
9.09411,
 +
47.460247
 +
  ],
 +
  [
 +
9.09428,
 +
47.460256
 +
  ],
 +
  [
 +
9.095238,
 +
47.460507
 +
  ],
 +
  [
 +
9.097622,
 +
47.460919
 +
  ],
 +
  [
 +
9.098073,
 +
47.461046
 +
  ]
 +
]
 +
  }
 +
},
 
{
 
{
  "type": "FeatureCollection",
+
  "type": "Feature",
  "features": [
+
  "properties": {
    {
+
"geom_type": "polygon",
      "type": "Feature",
+
"srid": "4326",
      "properties": {
+
"userid": "Id falls vorhanden",
    "geom_type": "point",
+
"title": "Baustelle mit Titel",
"srid": "4326",
+
"description": "Beschreibung der Baustelle",
        "userid": "Id falls vorhanden",
+
"trob_start": "02.03.2014 00:00:00",
        "title": "Baustelle mit Titel",
+
"trob_end": "10.08.2014 00:00:00",
        "description": "Beschreibung der Baustelle",
+
        "direction": "both",
        "trob_start": "02.03.2014 00:00:00",
+
        "country": "CH",
        "trob_end": "10.08.2014 00:00:00",
+
        "reason": "other",
        "direction": "both",
+
        "object_name": "StrassenName",
        "country": "CH",
+
        "object_type": "street",
        "reason": "other",
+
        "trob_type": "snow"
        "object_name": "StrassenName",
+
  },
        "object_type": "street",
+
  "geometry": {
        "trob_type": "snow"
+
"type": "MultiPolygon",
      },
+
"coordinates": [
      "geometry": {
+
  [
        "type": "Point",
+
[
        "coordinates": [
 
          7.499745,
 
          46.894146
 
        ]
 
      }
 
    },
 
{
 
  "type": "Feature",
 
  "properties": {
 
"geom_type": "line",
 
"srid": "4326",
 
"userid": "Id falls vorhanden",
 
"title": "Baustelle mit Titel",
 
"description": "Beschreibung der Baustelle",
 
"trob_start": "02.03.2014 00:00:00",
 
"trob_end": "10.08.2014 00:00:00",
 
        "direction": "both",
 
        "country": "CH",
 
        "reason": "other",
 
        "object_name": "StrassenName",
 
        "object_type": "street",
 
        "trob_type": "snow"
 
  },
 
  "geometry": {
 
"type": "LineString",
 
"coordinates": [
 
  [
 
9.089196,
 
47.459519
 
  ],
 
  [
 
9.089595,
 
47.459551
 
  ],
 
 
  [
 
  [
9.090497,
+
8.855176,
47.459699
+
47.335813
 
  ],
 
  ],
 
  [
 
  [
9.091234,
+
8.856409,
47.459805
+
47.336355
 
  ],
 
  ],
 
  [
 
  [
9.092256,
+
8.856582,
47.459843
+
47.336153
 
  ],
 
  ],
 
  [
 
  [
9.092337,
+
8.856706,
47.459863
+
47.33608
 
  ],
 
  ],
 
  [
 
  [
9.092452,
+
8.856562,
47.45989
+
47.33581
 
  ],
 
  ],
 
  [
 
  [
9.09265,
+
8.856341,
47.460003
+
47.33617
 
  ],
 
  ],
 
  [
 
  [
9.09411,
+
8.855788,
47.460247
+
47.335934
 
  ],
 
  ],
 
  [
 
  [
9.09428,
+
8.85531,
47.460256
+
47.335719
 
  ],
 
  ],
 
  [
 
  [
9.095238,
+
8.855176,
47.460507
+
47.335813
  ],
 
  [
 
9.097622,
 
47.460919
 
  ],
 
  [
 
9.098073,
 
47.461046
 
  ]
 
]
 
  }
 
},
 
{
 
  "type": "Feature",
 
  "properties": {
 
"geom_type": "polygon",
 
"srid": "4326",
 
"userid": "Id falls vorhanden",
 
"title": "Baustelle mit Titel",
 
"description": "Beschreibung der Baustelle",
 
"trob_start": "02.03.2014 00:00:00",
 
"trob_end": "10.08.2014 00:00:00",
 
        "direction": "both",
 
        "country": "CH",
 
        "reason": "other",
 
        "object_name": "StrassenName",
 
        "object_type": "street",
 
        "trob_type": "snow"
 
  },
 
  "geometry": {
 
"type": "MultiPolygon",
 
"coordinates": [
 
  [
 
[
 
  [
 
8.855176,
 
47.335813
 
  ],
 
  [
 
8.856409,
 
47.336355
 
  ],
 
  [
 
8.856582,
 
47.336153
 
  ],
 
  [
 
8.856706,
 
47.33608
 
  ],
 
  [
 
8.856562,
 
47.33581
 
  ],
 
  [
 
8.856341,
 
47.33617
 
  ],
 
  [
 
8.855788,
 
47.335934
 
  ],
 
  [
 
8.85531,
 
47.335719
 
  ],
 
  [
 
8.855176,
 
47.335813
 
  ]
 
]
 
 
  ]
 
  ]
 
]
 
]
  }
+
  ]
}
+
]
  ]
+
  }
 
}
 
}
 +
  ]
 +
}
 +
</nowiki>

Aktuelle Version vom 10. Juni 2014, 14:46 Uhr

Fields

  • Form-Fields:
    • input-type: file | name: file
    • input-type: text | name: email
  • GeoJSON fields in "properties" array:
    • "geom_type": String (Values: "point", "line", "poly")
    • "srid": String with srid number
    • "userid": String with an identiefier from the source
    • "title": String as title for the obstruction
    • "description": String as
    • "trob_start": String with date and time. Example: "02.03.2014 00:00:00"
    • "trob_end": String with date and time. Example: "02.03.2014 00:00:00"
    • "direction": String (Values: "both", "as_is", "reverse")
    • "country": String with ISO country code
    • "reason": String (Values: "other", "construction", "event")
    • "object_name": String with street name for example: "A1"
    • "object_type": String (Values: "street", "tunnel", "car_transport", "pass", "other",
    • "trob_type": String (Values: "closed", "snow", "closed_except_emergency", "closed_for_heavy_load", "obstructed", "other")

Upload examples

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
	    "geom_type": "point",
		"srid": "4326",
        "userid": "Id falls vorhanden",
        "title": "Baustelle mit Titel",
        "description": "Beschreibung der Baustelle",
        "trob_start": "02.03.2014 00:00:00",
        "trob_end": "10.08.2014 00:00:00",
        "direction": "both",
        "country": "CH",
        "reason": "other",
        "object_name": "StrassenName",
        "object_type": "street",
        "trob_type": "snow"
      },
      "geometry": {
        "type": "Point",
        "coordinates": [
          7.499745,
          46.894146
        ]
      }
    },
	{
	  "type": "Feature",
	  "properties": {
		"geom_type": "line",
		"srid": "4326",
		"userid": "Id falls vorhanden",
		"title": "Baustelle mit Titel",
		"description": "Beschreibung der Baustelle",
		"trob_start": "02.03.2014 00:00:00",
		"trob_end": "10.08.2014 00:00:00",
        "direction": "both",
        "country": "CH",
        "reason": "other",
        "object_name": "StrassenName",
        "object_type": "street",
        "trob_type": "snow"
	  },
	  "geometry": {
		"type": "LineString",
		"coordinates": [
		  [
			9.089196,
			47.459519
		  ],
		  [
			9.089595,
			47.459551
		  ],
		  [
			9.090497,
			47.459699
		  ],
		  [
			9.091234,
			47.459805
		  ],
		  [
			9.092256,
			47.459843
		  ],
		  [
			9.092337,
			47.459863
		  ],
		  [
			9.092452,
			47.45989
		  ],
		  [
			9.09265,
			47.460003
		  ],
		  [
			9.09411,
			47.460247
		  ],
		  [
			9.09428,
			47.460256
		  ],
		  [
			9.095238,
			47.460507
		  ],
		  [
			9.097622,
			47.460919
		  ],
		  [
			9.098073,
			47.461046
		  ]
		]
	  }
	},
	{
	  "type": "Feature",
	  "properties": {
		"geom_type": "polygon",
		"srid": "4326",
		"userid": "Id falls vorhanden",
		"title": "Baustelle mit Titel",
		"description": "Beschreibung der Baustelle",
		"trob_start": "02.03.2014 00:00:00",
		"trob_end": "10.08.2014 00:00:00",
        "direction": "both",
        "country": "CH",
        "reason": "other",
        "object_name": "StrassenName",
        "object_type": "street",
        "trob_type": "snow"
	  },
	  "geometry": {
		"type": "MultiPolygon",
		"coordinates": [
		  [
			[
			  [
				8.855176,
				47.335813
			  ],
			  [
				8.856409,
				47.336355
			  ],
			  [
				8.856582,
				47.336153
			  ],
			  [
				8.856706,
				47.33608
			  ],
			  [
				8.856562,
				47.33581
			  ],
			  [
				8.856341,
				47.33617
			  ],
			  [
				8.855788,
				47.335934
			  ],
			  [
				8.85531,
				47.335719
			  ],
			  [
				8.855176,
				47.335813
			  ]
			]
		  ]
		]
	  }
	}
  ]
}