Difference between revisions of "OpenStreetMap API"
Jump to navigation
Jump to search
(Created page with "Abrir http://overpass-turbo.eu/ Procurar no mapa por: Porto Escrever a seguinte consulta: <syntaxhighlight lang="text"> →procurar por restaurantes: [out:json]; // gathe...") |
|||
| Line 1: | Line 1: | ||
| + | === Wizard === | ||
| + | |||
| + | Usar o Wizard do overpass | ||
| + | |||
| + | No Wizard escrever: 'bakery or supermarket in Braga' | ||
| + | |||
| + | No Wizard escrever: 'pharmacy in porto' | ||
| + | |||
| + | <syntaxhighlight lang="text"> | ||
| + | /* | ||
| + | This has been generated by the overpass-turbo wizard. | ||
| + | The original search was: | ||
| + | “pharmacy in porto” | ||
| + | */ | ||
| + | [out:json][timeout:25]; | ||
| + | // fetch area “porto” to search in | ||
| + | {{geocodeArea:porto}}->.searchArea; | ||
| + | // gather results | ||
| + | ( | ||
| + | // query part for: “pharmacy” | ||
| + | node["amenity"="pharmacy"](area.searchArea); | ||
| + | way["amenity"="pharmacy"](area.searchArea); | ||
| + | relation["amenity"="pharmacy"](area.searchArea); | ||
| + | ); | ||
| + | // print results | ||
| + | out body; | ||
| + | >; | ||
| + | out skel qt; | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | === Manual... === | ||
| + | |||
Abrir http://overpass-turbo.eu/ | Abrir http://overpass-turbo.eu/ | ||
Revision as of 23:30, 14 May 2019
Wizard
Usar o Wizard do overpass
No Wizard escrever: 'bakery or supermarket in Braga'
No Wizard escrever: 'pharmacy in porto'
/*
This has been generated by the overpass-turbo wizard.
The original search was:
“pharmacy in porto”
*/
[out:json][timeout:25];
// fetch area “porto” to search in
{{geocodeArea:porto}}->.searchArea;
// gather results
(
// query part for: “pharmacy”
node["amenity"="pharmacy"](area.searchArea);
way["amenity"="pharmacy"](area.searchArea);
relation["amenity"="pharmacy"](area.searchArea);
);
// print results
out body;
>;
out skel qt;
Manual...
Abrir http://overpass-turbo.eu/
Procurar no mapa por: Porto
Escrever a seguinte consulta:
/*
procurar por restaurantes
*/
[out:json];
// gather results
(
node["amenity"="restaurant"]({{bbox}});
);
// print results
out body;
Executar a consulta
Exportar e escolher descarregar como geojson
Abrir o geojson no QGIS
A codificação dos caracteres no GeoJson é UTF-8.
No QGIS, a camada é apresentada com a indicação de que se trata (e bem) do sistema de coordenadas EPSG:4326 (WGS84).
Ao passar a camada para a base de dados, indicar que pretendemos uma transformação do sistema EPSG:4326 para EPSG:3763.
