background preloader

OpenStreetMap

Facebook Twitter

Xapi Web Service - MapQuest Platform. Xapi (pronounced zappy) is a read-only OpenStreetMap (OSM) Extended API that provides enhanced search and querying capabilities for nodes, ways and relations. The query can be defined by OSM tags and/or a bounding box and will return all current data that match the entered search terms. Comments, feedback, and support questions can be posted in our Open Forums.

Hello, World! Below is a simple example of a Xapi request to help further understand the service. An XML document containing the nodes that match the [key=value] pair within the bounding box will be returned. Example Search by Tag Choose the OSM element type and enter the [key=value] pair you wish to search. Search by Area If you already know the search area, enter the coordinates below. Xapi Predicates The following table describes the selection predicates that may be included to make a Xapi request.

Xapi Response. User:Petrovsk/FR:mapnik server. Construire son serveur cartographique sous Mac OS X. Cela fait un moment que j'ai envie de monter mon serveur cartographique, mais la tâche est ardue et j'ai dû renoncer après plusieurs tentatives infructueuses. Cela ressemble à un grand jeu de construction dont les pièces sont nombreuses, et il faut employer des techniques absconses pour les assembler. Comme il n'y a pas de guide spécifiquement conçu pour Mac OS X, j'ai décidé d'en faire un en regroupant les éléments m'ayant permis d'atteindre mon but.

Article original : Préambule Vue d'ensemble Nous allons partir d'un fichier de données OSM et aboutir à une carte affichée dans un navigateur internet. En rentrant plus dans le détail, nous découvrons le nom des divers programmes et scripts nécessaires pour faire tourner tout cela : Ces programmes sont très spécifiques et se basent pour certains sur des dépendances. Faisons la liste des courses : exit . Xapi. The OSM Extended API (or xapi, pronounced zappy) is a read-only API protocol, based on a modified version of the OSM main API, that provides enhanced search and querying capabilities.

It offers search queries for some common simple use cases and helps to put load off the main API. In particular, it reimplements the standard map request such that it can be performed much faster. Xapi uses a REST style interface with X-path flavouring. More sophisticated queries can be handled with other read-only mirrors such as Overpass API which support a more powerful but more complex syntax Xapi only ever deals with elements that are current and does not return any elements that are historical or deleted. All responses are in the same format as the standard protocol, but with the addition of some namespaced extensions.

Implementations There are several code/database implementation of the XAPI idea and several running deployments. jXAPI Note that bbox queries have a maximum of 10 square degrees. Xappy.js. Mapnik Example. This is an example of how you can use Mapnik , running on your own PC, to render a map using OpenStreetMap data. This example was generated on a Windows XP machine, set up in accordance with the instructions given on this Wiki. This example differs from most other Mapnik examples in that it only uses OpenStreetMap data and doesn't require you to set up of get hold of ESRI shape files . The example shows how to produce a map of Hampstead Heath. This is the image that is generated by Mapnik : This image can be produced by running either nik2img.py : $ nik2img.py -m heath.xml -o mymap.png -s 1024,1024 -r -22013,6719120,-17121,6724012 or the following Python code: #! This code calls up the Mapnik XML stylesheet heath.xml, which is listed below.

Note that Mapnik uses the Painter's algorithm to determine which objects appear on the top when rendering is performed. OpenStreetMap layer tagging is converted by Osm2pgsql into a z_order parameter in the PostGIS /PostgreSQL database. Hillshading with Mapnik. Since I have been doing a decent amount of piste mapping this winter, I wanted to see my results rendered in a visually appealing way. For skiers, it is important to know whether you are going uphill or downhill, hence a piste map needs elevation data. Personally, I find hillshading more intuitive than contours - at the cost of absolute height information and, to an extent, precision, but I can live with that.

Here's how I did it. Prerequisites My original setup included the following: Ubuntu 10.10 Mapnik - it is available through the Ubuntu package manager, and even the Mapnik viewer is included, which is very convenient for quick map debugging. I assume you are already familiar with Mapnik and have managed to render a simple map. Setup We will need a few extra tools: GDAL (available through the Ubuntu package manager, you need gdal-bin and libgdal1-dev) srtm_generate_header.sh, available at [1] PerryGeo (GDAL-based DEM utilies, available at [2]) Change that to PerryGeo Preparing Data -z 2.

Mapnik. Available languages — Mapnik is an open source toolkit for rendering maps. Among other things, it is used to render the five main Slippy Map layers on the OpenStreetMap website. It supports a variety of geospatial data formats and provides flexible styling options for designing many different kinds of maps. Mapnik is written in C++ and can be scripted using binding languages such as JavaScript (Node.js), Python, Ruby, and Java. The Mapnik Installation Wiki. You can learn more about using Mapnik at The Mapnik Wiki and by joining the #mapnik channel on freenode Note that Mapnik is a software project and should not be confused with any of the common map stylesheets that might be named after Mapnik.

Overview Mapnik can output map images to a variety of graphics formats - PNG, JPEG, SVG, and PDF. Mapnik Styles The Mapnik style rules used for the Standard OpenStreetMap are open-source and can be used as the basis for custom renderings of OSM data (see OSM Standard Mapnik Style below). Data Sources.