mirror of
https://github.com/medialab-prado/poblados-colonizacion-colonias-penitenciarias.git
synced 2025-06-07 22:11:29 +02:00
test gis, imgs poblados
This commit is contained in:
parent
f61a8a75e6
commit
780ff8f821
59 changed files with 697 additions and 70 deletions
1
test-gis/adm.cpg
Normal file
1
test-gis/adm.cpg
Normal file
|
@ -0,0 +1 @@
|
|||
UTF-8
|
BIN
test-gis/adm.dbf
Normal file
BIN
test-gis/adm.dbf
Normal file
Binary file not shown.
1
test-gis/adm.prj
Normal file
1
test-gis/adm.prj
Normal file
|
@ -0,0 +1 @@
|
|||
GEOGCS["ETRS89",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
|
1
test-gis/adm.qpj
Normal file
1
test-gis/adm.qpj
Normal file
|
@ -0,0 +1 @@
|
|||
GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]]
|
BIN
test-gis/adm.shp
Normal file
BIN
test-gis/adm.shp
Normal file
Binary file not shown.
BIN
test-gis/adm.shx
Normal file
BIN
test-gis/adm.shx
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1
test-gis/embalses2.cpg
Normal file
1
test-gis/embalses2.cpg
Normal file
|
@ -0,0 +1 @@
|
|||
UTF-8
|
BIN
test-gis/embalses2.dbf
Normal file
BIN
test-gis/embalses2.dbf
Normal file
Binary file not shown.
1
test-gis/embalses2.prj
Normal file
1
test-gis/embalses2.prj
Normal file
|
@ -0,0 +1 @@
|
|||
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
|
1
test-gis/embalses2.qpj
Normal file
1
test-gis/embalses2.qpj
Normal file
|
@ -0,0 +1 @@
|
|||
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]
|
BIN
test-gis/embalses2.shp
Normal file
BIN
test-gis/embalses2.shp
Normal file
Binary file not shown.
BIN
test-gis/embalses2.shx
Normal file
BIN
test-gis/embalses2.shx
Normal file
Binary file not shown.
|
@ -7,7 +7,8 @@ body {
|
|||
}
|
||||
|
||||
svg {
|
||||
background-color: #fff;
|
||||
background-color: #eee;
|
||||
margin: 10px auto;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
|
@ -16,19 +17,28 @@ svg {
|
|||
}
|
||||
|
||||
.penal {
|
||||
fill: #faa;
|
||||
fill: #a00;
|
||||
}
|
||||
|
||||
.entidad {
|
||||
fill: #afa;
|
||||
.scpm {
|
||||
fill: #a00;
|
||||
}
|
||||
|
||||
.entidad:hover{
|
||||
fill: #aaa;
|
||||
.zona {
|
||||
fill: #ccc;
|
||||
}
|
||||
|
||||
.adm {
|
||||
fill:#fff;
|
||||
stroke:#ddd;
|
||||
}
|
||||
|
||||
.poblado {
|
||||
fill: #0a0;
|
||||
}
|
||||
|
||||
.embalse {
|
||||
fill: #aaf;
|
||||
fill: #00a;
|
||||
}
|
||||
|
||||
|
||||
|
@ -66,7 +76,6 @@ var zoomrect = svg.append("rect")
|
|||
.call(zoom);
|
||||
|
||||
|
||||
var poblados;
|
||||
|
||||
d3.queue()
|
||||
.defer(d3.json, "./map.json")
|
||||
|
@ -77,76 +86,101 @@ d3.queue()
|
|||
function ready(error, map) {
|
||||
if (error) throw error;
|
||||
|
||||
var adm = topojson.feature(map, map.objects.adm)
|
||||
g.append("path")
|
||||
.datum(topojson.feature(map, map.objects.penales))
|
||||
.datum(adm)
|
||||
.attr("class", "adm")
|
||||
.attr("d", path);
|
||||
|
||||
|
||||
var zonas = topojson.feature(map, map.objects.zonas2)
|
||||
g.append("path")
|
||||
.datum(zonas)
|
||||
.attr("class", "zona")
|
||||
.attr("d", path);
|
||||
|
||||
path.pointRadius(2);
|
||||
|
||||
var penales = topojson.feature(map, map.objects.penales2);
|
||||
g.selectAll(".penal")
|
||||
.data(penales.features)
|
||||
.enter()
|
||||
.append("path")
|
||||
.attr("class", "penal")
|
||||
.attr("d", path);
|
||||
|
||||
poblados = topojson.feature(map, map.objects.poblados);
|
||||
path.pointRadius(3);
|
||||
|
||||
// for id, n1, n2, prov, year, n3, n4, x, y, n5, t1,t2,t3,t4,t5 of poblados.features[i].properties
|
||||
// console.log year;
|
||||
var scpm = topojson.feature(map, map.objects.scpm);
|
||||
g.selectAll(".scpm")
|
||||
.data(scpm.features)
|
||||
.enter()
|
||||
.append("path")
|
||||
.attr("class", "scpm")
|
||||
.attr("d", path);
|
||||
|
||||
g.append("path")
|
||||
.data([poblados])
|
||||
.attr("pointRadius", 2)
|
||||
.attr("class", "entidad")
|
||||
.attr("d", function(d){
|
||||
path.pointRadius(2);
|
||||
return path(d);
|
||||
});
|
||||
path.pointRadius(2);
|
||||
|
||||
g.append("path")
|
||||
.datum(topojson.feature(map, map.objects.embalses))
|
||||
.attr("pointRadius", 2)
|
||||
var embalses = topojson.feature(map, map.objects.embalses2);
|
||||
g.selectAll(".embalse")
|
||||
.data(embalses.features)
|
||||
.enter()
|
||||
.append("path")
|
||||
.attr("class", "embalse")
|
||||
.attr("d", function(d){
|
||||
path.pointRadius(2);
|
||||
return path(d);
|
||||
});
|
||||
.attr("d", path);
|
||||
|
||||
var poblados = topojson.feature(map, map.objects.poblados2);
|
||||
g.selectAll(".poblado")
|
||||
.data(poblados.features)
|
||||
.enter()
|
||||
.append("path")
|
||||
.attr("class", "poblado")
|
||||
.attr("d", path)
|
||||
|
||||
};
|
||||
|
||||
function update(yr) {
|
||||
var g = d3.select("body").transition();
|
||||
|
||||
pobladosFiltradas = [];
|
||||
for (var i = 0; i < poblados.features.length; i++) {
|
||||
var n = 0;
|
||||
var k = "";
|
||||
for (var k in poblados.features[i].properties) {
|
||||
if (n == 4) {
|
||||
var t = poblados.features[i].properties[k];
|
||||
if (parseInt(t) < yr) {
|
||||
pobladosFiltradas.push(poblados.features[i]);
|
||||
}
|
||||
}
|
||||
n++;
|
||||
}
|
||||
}
|
||||
// update poblados
|
||||
g.selectAll(".poblado").style("visibility", "hidden")
|
||||
.filter(function(d){
|
||||
return parseInt(d.properties.ANYO) < yr;
|
||||
})
|
||||
.style("visibility", "visible");
|
||||
|
||||
// update embalses
|
||||
g.selectAll(".embalse").style("visibility", "hidden")
|
||||
.filter(function(d){
|
||||
return parseInt(d.properties.Anyo) < yr;
|
||||
})
|
||||
.style("visibility", "visible");
|
||||
|
||||
// update penales
|
||||
g.selectAll(".penal").style("visibility", "hidden")
|
||||
.filter(function(d){
|
||||
var info = d.properties.PENALES_10;
|
||||
var anyos = info.split("-");
|
||||
if (anyos.length > 0) {
|
||||
var a1 = parseInt(anyos[0]);
|
||||
if (anyos.length == 2) var a2 = anyos[1];
|
||||
else var a2 = a1+5;
|
||||
return a1 < yr && a2 > yr;
|
||||
}
|
||||
})
|
||||
.style("visibility", "visible");
|
||||
|
||||
// update penales
|
||||
g.selectAll(".scpm").style("visibility", "hidden")
|
||||
.filter(function(d){
|
||||
var a1_ = d.properties.ANYOINICI;
|
||||
var a2 = parseInt(d.properties.ANYOFINAL);
|
||||
var a1 = parseInt(a1_);
|
||||
if (a1_ == "?") a1 = a2 - 6;
|
||||
return a1 < yr && a2 > yr;
|
||||
})
|
||||
.style("visibility", "visible");
|
||||
|
||||
g.selectAll(".entidad")
|
||||
.each(function(d) {
|
||||
// loop through the keys - this assumes no extra data
|
||||
d3.keys(d).forEach( function(key) {
|
||||
for (var k in d[key]) {
|
||||
var n = 0;
|
||||
var kv = "";
|
||||
for (var kv in poblados.features[k].properties) {
|
||||
if (n == 4) {
|
||||
var t = poblados.features[k].properties[k];
|
||||
if (parseInt(t) < yr) {
|
||||
//pobladosFiltradas.push(poblados.features[k]);
|
||||
d3.select(this).attr("visibility","hidden");
|
||||
}
|
||||
else {
|
||||
d3.select(this).attr("visibility","visible");
|
||||
}
|
||||
}
|
||||
n++;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function zoomed() {
|
||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -1 +1 @@
|
|||
PROJCS["ETRS89_UTM_zone_30N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
|
||||
GEOGCS["ETRS89",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
|
|
@ -1 +1 @@
|
|||
PROJCS["ETRS89 / UTM zone 30N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","25830"]]
|
||||
GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]]
|
||||
|
|
Binary file not shown.
Binary file not shown.
1
test-gis/penales2.cpg
Normal file
1
test-gis/penales2.cpg
Normal file
|
@ -0,0 +1 @@
|
|||
UTF-8
|
BIN
test-gis/penales2.dbf
Normal file
BIN
test-gis/penales2.dbf
Normal file
Binary file not shown.
1
test-gis/penales2.prj
Normal file
1
test-gis/penales2.prj
Normal file
|
@ -0,0 +1 @@
|
|||
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
|
1
test-gis/penales2.qpj
Normal file
1
test-gis/penales2.qpj
Normal file
|
@ -0,0 +1 @@
|
|||
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]
|
BIN
test-gis/penales2.shp
Normal file
BIN
test-gis/penales2.shp
Normal file
Binary file not shown.
BIN
test-gis/penales2.shx
Normal file
BIN
test-gis/penales2.shx
Normal file
Binary file not shown.
1
test-gis/poblados-2.cpg
Normal file
1
test-gis/poblados-2.cpg
Normal file
|
@ -0,0 +1 @@
|
|||
UTF-8
|
Binary file not shown.
|
@ -1 +1 @@
|
|||
PROJCS["WGS_1984_UTM_Zone_30N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
|
||||
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
|
|
@ -1 +1 @@
|
|||
PROJCS["WGS 84 / UTM zone 30N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32630"]]
|
||||
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]
|
||||
|
|
Binary file not shown.
Binary file not shown.
BIN
test-gis/poblados2.dbf
Normal file
BIN
test-gis/poblados2.dbf
Normal file
Binary file not shown.
1
test-gis/poblados2.prj
Normal file
1
test-gis/poblados2.prj
Normal file
|
@ -0,0 +1 @@
|
|||
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
|
BIN
test-gis/poblados2.shp
Normal file
BIN
test-gis/poblados2.shp
Normal file
Binary file not shown.
BIN
test-gis/poblados2.shx
Normal file
BIN
test-gis/poblados2.shx
Normal file
Binary file not shown.
1
test-gis/scpm.cpg
Normal file
1
test-gis/scpm.cpg
Normal file
|
@ -0,0 +1 @@
|
|||
UTF-8
|
BIN
test-gis/scpm.dbf
Normal file
BIN
test-gis/scpm.dbf
Normal file
Binary file not shown.
1
test-gis/scpm.prj
Normal file
1
test-gis/scpm.prj
Normal file
|
@ -0,0 +1 @@
|
|||
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
|
1
test-gis/scpm.qpj
Normal file
1
test-gis/scpm.qpj
Normal file
|
@ -0,0 +1 @@
|
|||
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]
|
BIN
test-gis/scpm.shp
Normal file
BIN
test-gis/scpm.shp
Normal file
Binary file not shown.
BIN
test-gis/scpm.shx
Normal file
BIN
test-gis/scpm.shx
Normal file
Binary file not shown.
BIN
test-gis/zonas-2.dbf
Normal file
BIN
test-gis/zonas-2.dbf
Normal file
Binary file not shown.
1
test-gis/zonas-2.prj
Normal file
1
test-gis/zonas-2.prj
Normal file
|
@ -0,0 +1 @@
|
|||
PROJCS["WGS_1984_UTM_Zone_30N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
|
1
test-gis/zonas-2.qpj
Normal file
1
test-gis/zonas-2.qpj
Normal file
|
@ -0,0 +1 @@
|
|||
PROJCS["WGS 84 / UTM zone 30N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32630"]]
|
BIN
test-gis/zonas-2.shp
Normal file
BIN
test-gis/zonas-2.shp
Normal file
Binary file not shown.
BIN
test-gis/zonas-2.shx
Normal file
BIN
test-gis/zonas-2.shx
Normal file
Binary file not shown.
1
test-gis/zonas2.cpg
Normal file
1
test-gis/zonas2.cpg
Normal file
|
@ -0,0 +1 @@
|
|||
UTF-8
|
BIN
test-gis/zonas2.dbf
Normal file
BIN
test-gis/zonas2.dbf
Normal file
Binary file not shown.
1
test-gis/zonas2.prj
Normal file
1
test-gis/zonas2.prj
Normal file
|
@ -0,0 +1 @@
|
|||
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
|
1
test-gis/zonas2.qpj
Normal file
1
test-gis/zonas2.qpj
Normal file
|
@ -0,0 +1 @@
|
|||
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]
|
BIN
test-gis/zonas2.shp
Normal file
BIN
test-gis/zonas2.shp
Normal file
Binary file not shown.
BIN
test-gis/zonas2.shx
Normal file
BIN
test-gis/zonas2.shx
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue