Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export HOTOSM tool #10

Open
ramyaragupathy opened this issue Apr 4, 2018 · 2 comments
Open

Export HOTOSM tool #10

ramyaragupathy opened this issue Apr 4, 2018 · 2 comments
Labels

Comments

@ramyaragupathy
Copy link
Owner

ramyaragupathy commented Apr 4, 2018

Referencing #7, HOTOSM's export tool is another option to download OpenStreetMap data. While playing around with the interface, looks like the tool can deal with any rectangular/custom polygon boundaries. Using this ticket to document learnings.

@ramyaragupathy
Copy link
Owner Author

YAML

  • It is a data serialisation language like JSON. Emphasis is on readability
  • Written in plain text with certain syntax formatting
  • Different from markdown. Full form: YAML Ain't Markup Language
  • .yml & .yaml extensions
  • Space indentation defines scopes
  • date & time in ISO 8601 standard yyyy-mm-ddThh:mm:ss
  • Data represented as k-v pairs
  • There also lists, comments, type conversions, anchoring specific keys & anchoring k-v pairs.
  • Resources

Eg:

buildings: 
  select: 
    - name
    - building
  types: 
    - polygons
  where: "building IS NOT NULL"
hospitals: 
  select: 
    - name
    - amenity
  where: "amenity = hospital"
waterways: 
  select: 
    - name
    - waterway
  types: 
    - lines
    - polygons
  where: "natural IN ('waterway')"

This is equivalent to:

{buildings:{select:[name, building], types:[polygons], where:"building IS NOT NULL"},
hospitals:{select:[name, amenity], where:"amenity=hospital"},
waterways:{select:[name, watrway], types:[lines, polygons], where:"natural IN ('waterway')"}

@ramyaragupathy
Copy link
Owner Author

ramyaragupathy commented Apr 7, 2018

From Network

On clicking Create Export, request payload is created & this is sent to the path /api/jobs

Example payload:

{
	"published": false,
	"feature_selection": "planet_osm_point:\n  types:\n    - points\n  select:\n    - 'access:roof'\n    - 'addr:housenumber'\n    - 'addr:street'\n    - building\n    - 'building:material'\n    - name\n    - 'roof:material'\n  where:\n    - building IS NOT NULL\nplanet_osm_polygon:\n  types:\n    - polygons\n  select:\n    - 'access:roof'\n    - 'addr:housenumber'\n    - 'addr:street'\n    - building\n    - 'building:material'\n    - name\n    - 'roof:material'\n  where:\n    - building IS NOT NULL\n",
	"export_formats": ["shp"],
	"aoi": {
		"description": "India, Tamil Nadu, Cuddalore",
		"geomType": "Polygon",
		"title": "Neyveli"
	},
	"the_geom": {
		"type": "Polygon",
		"coordinates": [
			[
				[79.49, 11.599999999999994],
				[79.49, 11.620000000000005],
				[79.51, 11.620000000000005],
				[79.51, 11.599999999999994],
				[79.49, 11.599999999999994]
			]
		]
	},
	"name": "Test"
}

@ramyaragupathy ramyaragupathy added good first issue Good for newcomers duplicate This issue or pull request already exists and removed duplicate This issue or pull request already exists good first issue Good for newcomers labels Dec 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant