Created
November 3, 2014 20:42
-
-
Save aaizemberg/89c204c9c2541446e275 to your computer and use it in GitHub Desktop.
Departamentos vecinos en la provincia de Tucumán
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="//code.jquery.com/jquery.min.js"></script> | |
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | |
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> | |
<meta charset="utf-8"> | |
<title>Tucumán (departamentos vecinos)</title> | |
</head> | |
<body> | |
<h1>Provincia de Tucumán</h1> | |
<h2>departamentos vecinos</h2> | |
<iframe width="800" height="600" scrolling="no" frameborder="no" src="https://www.google.com/fusiontables/embedviz?containerId=googft-gviz-canvas&viz=GVIZ&t=GRAPH&gc=false&gd=false&sdb=1&rmax=100000&q=select+col0%2C+col1%2C+col4+from+1GccQQWoeX4BStyYtE9PXYSIgp-nTX-RBMtFo0gMW&qrs=+where+col0+%3E%3D+&qre=+and+col0+%3C%3D+&qe=&uiversion=2&state=%7B%22ps%22%3A%221_7_25_1m_9_2k_h_5_-c_-1w_0_7_-n_3_15_-e_4_15_q_c_2s_28_2_1v_-m_b_3i_1k_e_-16_-2y_1_-12_-12_6_11_21_8_1r_2s_a_3j_s_d_-1j_-1z_f_-9_-37_g_-t_-3u_%22%2C%22cx%22%3A39.31839656031577%2C%22cy%22%3A-18.934104882742233%2C%22sw%22%3A396.33272976060107%2C%22sh%22%3A396.33272976060107%2C%22z%22%3A0.8089545696380412%7D&gco_forceIFrame=true&gco_hasLabelsColumn=true&width=800&height=600"></iframe> | |
<pre> | |
SELECT | |
st_x(st_transform(st_centroid(a.geom),4326)) as X, | |
st_y(st_transform(st_centroid(a.geom),4326)) as Y, | |
a.nomdep as fuente, | |
b.nomdep as destino | |
FROM | |
(SELECT * FROM paisxdpto2010 WHERE nomprov = 'TUCUMAN' ) as a, | |
(SELECT * FROM paisxdpto2010 WHERE nomprov = 'TUCUMAN' ) as b | |
WHERE st_relate(a.geom, b.geom) = 'FF2F11212'; | |
# es equivalente a este otro query | |
SELECT | |
st_x(st_transform(st_centroid(a.geom),4326)) as X, | |
st_y(st_transform(st_centroid(a.geom),4326)) as Y, | |
a.nomdep as fuente, | |
b.nomdep as destino | |
FROM | |
(SELECT * FROM paisxdpto2010 WHERE nomprov = 'TUCUMAN' ) as a, | |
(SELECT * FROM paisxdpto2010 WHERE nomprov = 'TUCUMAN' ) as b | |
WHERE st_intersects(a.geom, b.geom) and not st_equals(a.geom, b.geom); | |
</pre> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment