elastic / ems-file-service

Data sources for Elastic Map Service
Other
3 stars 8 forks source link

Add Chile Regions, Provinces and Communes #96

Open silva96 opened 5 years ago

silva96 commented 5 years ago

Chile has three Political - Administrative layers of territory subdivision 16 regions that hold 56 Provinces and those provinces hold 346 communes.

Here is a geojson with the polygons

https://drive.google.com/file/d/1C4unrWIxhMwJ1HofFZJfVNUXgzMMXwOS/view?usp=sharing

I hope this helps.

the original source is available online in the website of real state ministry

http://www.ide.cl/descarga/capas/item/division-politica-administrativa-2018.html

For the regions, here are the iso codes:

https://es.wikipedia.org/wiki/ISO_3166-2:CL

silva96 commented 5 years ago

There are communes that are just one polygon and there are others (mainly the ones that involve little islands) that are multipolygons. Overall, they are pretty well shaped.

This is an example

{
  "type": "Feature",
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [-70.57270999876738, -33.45890000173364],
        [-70.57286000118808, -33.45922000210135],
        [-70.57309000010338, -33.45971000221476],
        [-70.57331000035617, -33.460190000967714],
        [-70.57358999977862, -33.4607700007349],
        [-70.5739799988778, -33.461590000777846],
        [-70.57428000012186, -33.462240001974465],
        ... many other coordinates.
      ]
    ]
  },
  "properties": {
    "OBJECTID": 276,
    "CUT_REG": "13",
    "CUT_PROV": "131",
    "CUT_COM": "13120",
    "PROVINCIA": "Santiago",
    "COMUNA": "Ñuñoa",
    "REGION": "Metropolitana de Santiago"
  }
}

image

Number in CUT_PROV (province internal id) is composed of the CUT_REG id plus an autonumeric number that represents that Province inside that Region.

Same in Communes id (CUT_COM is CUT_PROV concatenated with an autonumeric id for that commune inside that province.

so Ñuñoa is the twentieth commune inside the first provinces of the thirteenth region of Chile

This would let us calculate boundaries as "Region boundaries (sum of province outer boundaries inside each region)" or "Province boundaries (sum of commune outer boundaries inside each province)" or just commune boundaries.

nickpeihl commented 5 years ago

Thank you for your interest @silva96.

We will release vector layers for each administrative level (region, province, commune). At the region administrative level we would include the ISO 3166-2 code and the CUT code as fields. At the province and commune levels we would include the CUT code as fields (there is no ISO code at this level). The province and commune boundaries are extremely detailed and will need to be simplified for display in Kibana.

I expect to release these layers in multiple phases.

Phase 1

Phase 2

silva96 commented 5 years ago

@nickpeihl

Great to hear that!, please let me know if you need anything from me.

nickpeihl commented 5 years ago

@silva96 Phase 1 is complete and Chile regions are now available from Elastic Maps Service.

silva96 commented 5 years ago

@nickpeihl, amazing. How do I access to them? Update kibana to latest?

nickpeihl commented 5 years ago

@silva96 They should already be available in all versions of Kibana. You can also see them at https://maps.elastic.co/#file/chile_regions.

mnavarrocarter commented 5 years ago

@nickpeihl Thanks a lot this awesome feature. I have one question: is there an api on Elastic's map service that I could use to consume that data?

nickpeihl commented 5 years ago

@mnavarrocarter The API is strictly governed by the Terms of Service limiting its use to only Elastic products.

However, the vector data itself is licensed as Open Data subject to the requirements of the OpenStreetMap OdBL license. You can download and re-use our vector data from https://maps.elastic.co. There is a "Download GeoJSON" button for each layer on that page.

mnavarrocarter commented 5 years ago

Ah great! I think the GeoJSON button will do! Thanks a lot!