Ejemplos de uso del Namespace 'locate/'
Nota: Para la ejecución de los ejemplos se usa curl en linea de comandos.
Petición:
curl http://b5m.gipuzkoa.eus/api/1.0/es/locate/mbr/D_4545.json
Resultado:
{ "mbr": { "xmax": "-257492.108261", "ymax": "5339401.770069", "xmin": "-257648.983135", "ymin": "5339181.82731" } }
Petición:
curl http://b5m.gipuzkoa.eus/api/1.0/es/locate/geometry/D_4545.gml
Resultado:
<wfs:FeatureCollection xmlns:bsc="http://www.bsc-eoc.org/bsc" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <gml:featureMember> <building xmlns:gml="http://www.opengis.net/gml"> <gml:id>E_17312</gml:id> <gml:geometryProperty> <gml:Polygon srsName="SDO:900913" xmlns:gml="http://www.opengis.net/gml"> <gml:outerBoundaryIs> <gml:LinearRing> <gml:coordinates decimal="." cs="," ts=" ">-257559.394301,5339197.630033 -257555.72837,5339191.686249 -257553.944217,5339192.621381 -257547.695059,5339181.82731 -257534.272271,5339189.660385 -257538.563924,5339196.93432 -257538.843028,5339197.407425 -257539.607523,5339198.703112 -257539.956471,5339199.294459 -257544.167615,5339206.432198 -257542.458405,5339207.44795 -257544.29798,5339210.699637 -257544.568414,5339211.177756 -257545.884807,5339213.504691 -257546.155241,5339213.982811 -257546.356279,5339214.338018 -257548.051524,5339217.334763 -257549.980708,5339216.23546 -257553.980121,5339223.305205 -257554.250692,5339223.783327 -257555.068883,5339225.229703 -257555.339318,5339225.707823 -257559.20629,5339232.543209 -257548.117355,5339238.861397 -257547.00969,5339236.903474 -257546.250572,5339237.325127 -257545.468613,5339237.759513 -257542.781044,5339239.290648 -257542.129299,5339239.680196 -257541.361521,5339240.139029 -257540.684726,5339240.543491 -257541.776862,5339242.47407 -257530.543133,5339248.874899 -257526.754659,5339242.57431 -257526.458416,5339242.069996 -257525.73584,5339240.840079 -257525.441622,5339240.339355 -257521.117552,5339233.04202 -257522.944902,5339231.951503 -257522.749339,5339231.613522 -257522.553913,5339231.275542 -257522.358348,5339230.937699 -257521.967222,5339230.261738 -257521.771796,5339229.923758 -257521.576232,5339229.585915 -257521.185106,5339228.909954 -257520.989679,5339228.572112 -257520.714568,5339228.096563 -257519.342794,5339225.725452 -257519.0169,5339225.162335 -257518.831063,5339224.84093 -257518.62537,5339224.485546 -257518.419814,5339224.130163 -257518.214121,5339223.774778 -257518.008429,5339223.419257 -257517.802873,5339223.063874 -257517.59718,5339222.708489 -257517.391625,5339222.352969 -257517.236039,5339222.084186 -257515.187809,5339223.185112 -257511.154415,5339215.920013 -257510.921175,5339215.499795 -257510.139386,5339214.091656 -257509.906011,5339213.6713 -257509.560334,5339213.048636 -257506.647528,5339207.801916 -257506.314136,5339207.201211 -257505.855213,5339206.374721 -257504.967386,5339206.858126 -257503.142064,5339207.852019 -257502.285881,5339208.318228 -257501.843962,5339208.558847 -257500.867256,5339209.090592 -257496.769874,5339211.321704 -257495.793167,5339211.853448 -257495.351248,5339212.094067 -257492.931562,5339213.411582 -257492.69079,5339213.542656 -257492.108261,5339213.859779 -257492.705029,5339214.963704 -257492.835772,5339215.205339 -257501.612183,5339231.439605 -257501.034469,5339231.75402 -257500.522432,5339230.806812 -257499.753613,5339231.225356 -257502.034393,5339235.107798 -257504.135646,5339238.684696 -257506.514635,5339242.734415 -257507.14247,5339242.371202 -257506.58673,5339241.425007 -257507.627408,5339240.809249 -257508.517757,5339242.324821 -257508.951819,5339242.073689 -257509.317246,5339242.709851 -257512.51251,5339248.272607 -257512.20396,5339248.451097 -257513.477692,5339250.668411 -257513.786105,5339250.489921 -257516.744914,5339255.64082 -257516.610182,5339255.718748 -257517.687426,5339257.594088 -257521.072673,5339255.635574 -257522.53975,5339258.328314 -257523.802619,5339259.899334 -257525.542892,5339260.911253 -257528.549359,5339261.751209 -257530.420724,5339261.742184 -257532.26098,5339261.400658 -257534.011964,5339260.73756 -257535.618169,5339259.773739 -257536.808772,5339261.739637 -257548.887629,5339254.651997 -257549.932735,5339256.455313 -257556.271954,5339252.748045 -257555.22982,5339250.949841 -257556.829887,5339250.015796 -257567.286831,5339244.000841 -257566.088314,5339242.080934 -257568.240269,5339241.158862 -257570.039206,5339239.657093 -257570.913461,5339238.506057 -257571.592467,5339237.229284 -257572.058971,5339235.859759 -257572.300628,5339234.432846 -257572.311384,5339232.985608 -257575.871259,5339231.644483 -257573.108423,5339225.306746 -257572.616581,5339224.485073 -257572.437816,5339224.186271 -257570.819872,5339221.48337 -257570.641108,5339221.184568 -257566.779692,5339214.506495 -257563.291309,5339208.473444 -257565.116451,5339207.551018 -257559.394301,5339197.630033 </gml:coordinates> </gml:LinearRing> </gml:outerBoundaryIs> </gml:Polygon> </gml:geometryProperty> </building> </gml:featureMember> <gml:featureMember> <building xmlns:gml="http://www.opengis.net/gml"> <gml:id>E_17316</gml:id> <gml:geometryProperty> <gml:Polygon srsName="SDO:900913" xmlns:gml="http://www.opengis.net/gml"> <gml:outerBoundaryIs> <gml:LinearRing> <gml:coordinates decimal="." cs="," ts=" ">-257603.491734,5339356.735653 -257603.148944,5339356.963765 -257607.293235,5339363.715736 -257615.933385,5339377.611605 -257623.027881,5339389.074021 -257630.943038,5339401.770069 -257648.983135,5339390.820216 -257638.54954,5339374.849421 -257629.001379,5339359.931618 -257624.413422,5339352.443327 -257620.268277,5339345.677619 -257619.855922,5339345.903782 -257619.201959,5339346.262668 -257619.138193,5339346.305168 -257610.112889,5339352.32545 -257607.747484,5339353.903267 -257603.491734,5339356.735653 </gml:coordinates> </gml:LinearRing> </gml:outerBoundaryIs> </gml:Polygon> </gml:geometryProperty> </building> </gml:featureMember> </wfs:FeatureCollection>
Petición:
curl http://b5m.gipuzkoa.eus/api/1.0/es/locate/info/D_4545.json
Resultado:
{ "info": { "type": "postal_id", "postal_code": { "id_municipality": "017", "name": "SALESIANOS, CONVENTO", "bis": " ", "postal_code": "20720", "district_code": "02", "municipality": "AZKOITIA", "num": "012", "street": "AIZKIBEL KALEA", "section_code": "002", "id_street": "1240" } } }
Petición:
curl "http://b5m.gipuzkoa.eus/api/1.0/es/locate/search/san%20martin.xml"
Resultado:
<?xml version="1.0" encoding="UTF-8"?> <hash> <items type="array"> <item> <type>AREA RECREATIVA</type> <address> </address> <name>ÁREA RECREATIVA SAN MARTIN</name> <urls type="array"> <url> <ortho>http://b5m.gipuzkoa.eus/url5000/index.php?id=Z_17418&lengua=0&actu=0&categoria=VITO_FOTO</ortho> <b5map type="array"> <b5map> <map>http://b5m.gipuzkoa.eus/b5map/r1/es/mapa/localizar/Z_17418/capa/mapa</map> <ortho>http://b5m.gipuzkoa.eus/b5map/r1/es/mapa/localizar/Z_17418/capa/ortofoto</ortho> <pictometry>http://b5m.gipuzkoa.eus/b5map/r1/es/pictometry/localizar/Z_17418</pictometry> </b5map> </b5map> <map2d>http://b5m.gipuzkoa.eus/url5000/index.php?id=Z_17418&lengua=0&actu=0&categoria=VITO</map2d> <info>http://b5m.gipuzkoa.eus/kaletegia/url?key=Z_17418&lengua=0</info> <map3d>http://b5m.gipuzkoa.eus/gipuzkoa3D/Gipuzkoa3D/ReDist/LurbiraRotAroundPt.htm?574919,4766826,299</map3d> <google>http://maps.google.com/maps?q=43.0485529731966+-2.08143354268623(ÁREA RECREATIVA SAN MARTIN [AMEZKETA])&ll=43.0485529731966,-2.08143354268623&spn=.001927179946284691136974037600716204118174,.001927179946284691136974037600716204118174&t=m&hl=es</google> </url> </urls> <code>Z_17418</code> </item> </items> </hash>
Petición:
curl "http://b5m.gipuzkoa.eus/api/1.0/es/locate/center/PK_GI-3301_2.xml"
Resultado:
<?xml version="1.0" encoding="UTF-8"?> <center> <x>-273444.417864</x> <y>5344163.143344</y> </center>