Skip to content

Commit

Permalink
Update files
Browse files Browse the repository at this point in the history
  • Loading branch information
martgnz committed Aug 6, 2019
1 parent 08f8e4e commit ce85f2a
Show file tree
Hide file tree
Showing 79 changed files with 1,620 additions and 1,540 deletions.
21 changes: 21 additions & 0 deletions LICENSE
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.
61 changes: 15 additions & 46 deletions README.md
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 area-estadistica-basica/area-estadistica-basica.geojson

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions area-estadistica-basica/area-estadistica-basica.json

Large diffs are not rendered by default.

240 changes: 0 additions & 240 deletions area-estadistica/area-estadistica_geo.json

This file was deleted.

1 change: 0 additions & 1 deletion area-estadistica/area-estadistica_topo.json

This file was deleted.

9 changes: 0 additions & 9 deletions area-interes/area-interes_geo.json

This file was deleted.

1 change: 0 additions & 1 deletion area-interes/area-interes_topo.json

This file was deleted.

Loading

0 comments on commit ce85f2a

Please sign in to comment.