-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
79 changed files
with
1,620 additions
and
1,540 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 Martín González | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,28 @@ | ||
Barcelona Geodata | ||
Barcelona geodata | ||
================= | ||
The official shapefiles from Barcelona, converted to GeoJSON and TopoJSON for making your life easier. | ||
The [official shapefiles](http://w20.bcn.cat/cartobcn/default.aspx) of Barcelona, converted to GeoJSON and TopoJSON for making your life easier. | ||
|
||
## CDN | ||
By popular request, here are the links for using the files directly, using [RawGit](https://rawgit.com/): | ||
*Check out [bcn-atlas](https://github.com/martgnz/bcn-atlas) to generate your TopoJSON with combined features, fine-grained controls and no need of external dependencies.* | ||
|
||
Àrea estadística: | ||
``` | ||
https://cdn.rawgit.com/martgnz/bcn-geodata/master/area-estadistica/area-estadistica_geo.json | ||
``` | ||
``` | ||
https://cdn.rawgit.com/martgnz/bcn-geodata/master/area-estadistica/area-estadistica_topo.json | ||
``` | ||
|
||
Àrea d'interès: | ||
``` | ||
https://cdn.rawgit.com/martgnz/bcn-geodata/master/area-interes/area-interes_geo.json | ||
``` | ||
``` | ||
https://cdn.rawgit.com/martgnz/bcn-geodata/master/area-interes/area-interes_topo.json | ||
``` | ||
|
||
Barris: | ||
``` | ||
https://cdn.rawgit.com/martgnz/bcn-geodata/master/barris/barris_geo.json | ||
``` | ||
``` | ||
https://cdn.rawgit.com/martgnz/bcn-geodata/master/barris/barris_topo.json | ||
``` | ||
## Metadata | ||
|
||
Districtes: | ||
``` | ||
https://cdn.rawgit.com/martgnz/bcn-geodata/master/districtes/districtes_geo.json | ||
``` | ||
``` | ||
https://cdn.rawgit.com/martgnz/bcn-geodata/master/districtes/districtes_topo.json | ||
``` | ||
|
||
Secció censal: | ||
``` | ||
https://cdn.rawgit.com/martgnz/bcn-geodata/master/seccio-censal/seccio-censal_geo.json | ||
``` | ||
``` | ||
https://cdn.rawgit.com/martgnz/bcn-geodata/master/seccio-censal/seccio-censal_topo.json | ||
``` | ||
Please read the [metadata file](http://w20.bcn.cat/cartobcn/getFile.ashx?t=bdd&f=47185360245555) for a description of every file and field. | ||
|
||
## Recreate the files | ||
Assuming that you have [ogr2ogr](https://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries) and [topojson](https://github.com/mbostock/topojson) installed: | ||
Assuming that you have [ogr2ogr](https://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries) and [topojson-server](https://github.com/topojson/topojson-server) installed globally: | ||
|
||
- Run the script | ||
```bash | ||
$ ./convert.sh | ||
``` | ||
- Voilà! Find the files in the `src/output` folder. | ||
- Voilà! Find the files in their respectives folder. | ||
|
||
You can tweak the script to delete properties from the original shapefile and adjust the simplification. | ||
|
||
Thanks to [@oscarfonts](https://github.com/oscarfonts) for the NTv2 ICC grid. | ||
|
||
## Source | ||
|
||
You can tweak the script for maintaining more properties from the original shapefile or for adjusting the simplification. Thanks to [@oscarfonts](https://github.com/oscarfonts) for the NTv2 ICC grid. | ||
Ajuntament de Barcelona / [CartoBCN](http://w20.bcn.cat/cartobcn/) ([CC-BY](http://w133.bcn.cat/geoportal/descargas/ca_ca_cond_us_carto.pdf)). | ||
|
||
Source: Ajuntament de Barcelona / [CartoBCN](http://w20.bcn.cat/cartobcn/). License: CC-BY. | ||
Last data update: 28/11/2018. |
240 changes: 240 additions & 0 deletions
240
area-estadistica-basica/area-estadistica-basica.geojson
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.