Tag Info

Hot answers tagged

4

You could use the following approach: [bbox:{{bbox}}]; way[highway][name="6th Avenue"];node(w)->.n1; way[highway][name="West 23rd Street"];node(w)->.n2; node.n1.n2; out meta; Try it on overpass turbo: http://overpass-turbo.eu/s/6Pb Edit: node.n1.n2; calculates the intersection of input set .n1 and .n2. Please check the documentation for details.


3

First of all, there's also a Geofabrik Tool available to find ways without tags, called OSM Inspector. The respective analysis can be found in the tagging view as ways without tags (just in case someone wonders, why overpass turbo comes into play for this). Back to the question: Find all ways in a bbox and remove all ways with any tag will give you the ...


3

The reason you are getting a "not well formed" error in console is because your tilejson file loads asynchronously, meaning the script continues to execute while the tilejson object is only partly loaded as an incomplete promise object. So when you pass your tilejson object to L.mapbox.map, you are actually passing a promise object (which it can't parse). ...


3

You can get the Umweltzone using the following Settings in Quick OSM. Note that you can simply search for the name: Afterwards, you can use Save as ... to save to a Shapefile (or just copy the temporary Shapefile Quick OSM creates).


3

If I restate your question, the problem that you are trying to solve is to have tiles in EPSG:3071. The solution to this problem lies in creating tiles in this projection itself, rather than reprojecting existing web-mercator tiles into this projections. For this you need two things. You need a Map server to create the images, and a Tiler to create the ...


3

While the answer that you have posted works, it doesn't really get to the root of the issue. The error indicates that you are trying to load the JSON from a a location that is not on the same domain. In the OP's case, the application is not being hosted from a webserver, and is trying to load the JSON from the file system. The real solution for this is to ...


2

Overpass can also be used in "script"-mode. All queries can be formulated as http-requests to the Overpass server. Overpass Turbo is only for interactive queries There is already a service providing the information that you need, unfortunately the server seems to be down for maintenance at the moment. However, you can find some information about it on ...


2

Last time I tried to pass tileJSON directly to the L.mapbox.map constructor, I ran into issues when mapbox.js tried to automatically load retina tiles from my non-mapbox tileserver. If you are using a retina device, could point to your problem. If not, might cause additional problems after you've fixed your current issue. Check your console to see if you ...


2

Assuming that you want the actual intersection of the bounding box, then create a bounding box as a sub-query at the same level as the select from osm_admin, and take the intersection of this bbox with lg.geometry. Note the ST_Intersects also in the where clause. SELECT row_to_json(fc) FROM ( SELECT ST_AsGeoJSON(ST_Intersection(lg.geometry, ...


2

Please add WHERE ST_Intersects(lg.geometry, bbox.geom) AND admin_level < 4. This will give you the result for those features which intersect with the given geometry AND whose admin_level is less than 4.


2

I suggest to go through the Mapnik style definition file. These can be: osm.xml including all files in the inc subfolder (Old style) CartoCSS stylesheets (Current style) the rendering rulesets of Maperitive Look out for the items that are used for low levels, and keep those. For the zoom levels 0 to 5, Mapnik uses coastline shapefiles and Natural Earth ...


2

Not an easy task, but this way it works for me: Load the point layer into QGIS (supposed to be in EPSG:900913, else reproject it to any projected CRS) make a copy of the layer Install the MMQGIS plugin From the Plugins menu, choose Create Hublines. Select your two layers, and the name attribute for both as ID. After executing, all busstops with the same ...


2

You will find the route relations in the planet_osm_line table, with a negative osm_id field value corresponding to the OSM relation ID. Once you have loaded the table, you can set a filter on the table with rightclick on the layer entry: "osm_id" = '-51855' to get only the trail you want, and then export the result to the format you want. If you want a ...


2

The use of && will return quicker than ST_Intersects, as it is only checking bounding boxes, which is the first stage of any spatial intersection query, via the bounding boxes stored as part of R-Tree indexing (technically a GIST index in Postgis, but the bounding box is still used in index construction). As, the second stage, the actual intersection ...


2

Note that planners have difficulty with subqueries, and your example can be rewritten without subqueries. A flattened query should look like this: SELECT A.* FROM osm_addr2 AS addr, osm_addr2 AS POI WHERE POI.osm_id=-332537 AND ST_Intersects(addr.geometry, POI.geometry); There's a relevant example in the manual (last two SQL examples), where a subquery is ...


2

If you want to convert it to a Shapefile just download the xml (for example right-mouse-click on the download link and choose something like "save target as..." instead of opening it in the browser. then in Qgis choose "add vectorlayer" or use drag and drop to add your xml layer to your Qgis project. then save layer as shapefile. If you are just looking for ...


1

I have found that rearranging the query so that the sub-query is at the same level as the initial select, essentially a Cartesian product, but then using the where clause to restrict the records read, will cause the indexes to be used and avoid a full table scan. SELECT * FROM osm_addr2 AS addr, (SELECT geometry FROM osm_addr2 WHERE osm_id=-332537) ...


1

I had a similar problem an I solved it with the following statement: SELECT city.name, postcode.tags->'postal_code' FROM planet_osm_polygon postcode JOIN planet_osm_polygon city ON ST_INTERSECTS(city.geometry, postcode.geometry) AND NOT ST_Touches(city.geometry, postcode.geometry) WHERE a.name = 'cityname' AND b.boundary = 'postal_code'; ...


1

Yes, regex is supported with the =~ operator. For example, [name=~'^.{12,}$'] { text-name: ''; } will remove labels above a certain length. You can find this and more examples in this Advanced CartoCSS techniques slide deck.


1

The best solution we found is to use Overpass-Turbo "diff" functionnality. Here is the XML script I use to get changes on roads in a given bounding box, between 2 dates: <osm-script date="2014-09-21T15:00:00Z" from="2012-09-14T15:00:00Z"> <union> <query type="way"> <has-kv k="highway"/> <bbox-query {{bbox}}/> ...


1

You can look at the OSM-Full-History-Dump File. Every change that has been made ever to an osm feature (geometry or attributes) is saved in this file. Using the OSM-History-Splitter (https://github.com/MaZderMind/osm-history-splitter) to clip the OSM history file to a BBOX and use the OSM-History-Importer (https://github.com/MaZderMind/osm-history-renderer) ...


1

PostgreSQL doesn't use indexes for functions, it uses indexes for operators only. What happens is function inlining. ST_INTERSECTS is defined as: CREATE OR REPLACE FUNCTION ST_Intersects(geom1 geometry, geom2 geometry) RETURNS boolean AS 'SELECT $1 && $2 AND _ST_Intersects($1,$2)' LANGUAGE 'sql' IMMUTABLE; And so the query gets rewritten to use ...


1

AFAIK iD currently doesn't support WMS but TMS protocol (press B key and add a custom TMS URL). Thus you might deliver a tile map service instead of WMS or use a proxy (for example mapproxy).


1

I think you are encountering this known issue: Bug report #10000 Cannot use osm layers (no features?) You'll have to save to a different file format before you can use the data with Processing.


1

Form Here! it says .. SELECT * FROM {table_name} WHERE the_geom && ST_SetSRID(ST_MakeBox2D(ST_Point(-73.9980, 40.726), ST_Point(-73.995, 40.723)), 4326) Here, we use some of the same functions you have seen previously. The opperator, &&, always uses the bounding box of geometries, unlike ST_Intersects which uses the full shape of a ...


1

As an alternative to osmosis you can try to use osmconvert and osmfilter in your scripts. Availeable on both, WIN and Linux. You can download a bigger country extract from geofabrik.de or other sources, and then do a kind of clipping with bounding boxes or maybe even polygon files. Maybe there are even boundary relations which describe the exact ...


1

The best place for subsetted datasets is geofabrik IMHO. The tool of choice, if you want to keep the data in PBF format is Osmosis It is a java Application and will run on Windows and Linux. I run mine on Windows 2008 R2 and Ubuntu Trusty. Check Out The Beginners Guide I did not have too much trouble getting to grips with it.


1

In addition to what AndreJ said, it might help to use osmconvert to determine which objects are large enough to be displayed at a requested zoom level. The --add-bboxweight-tags will help you: --add-bboxweight-tags This option will add the binary logarithm of the bbox area of each way and each relation. For example: <tag ...


1

Setting bounds for the layer solves the problem. Because leaflet will not try to fetch tiles out of the specified bounds var southWest = L.latLng(13.02504085518189, 80.23609399795532), northEast = L.latLng(13.026849183135116, 80.23797690868378), bounds = L.latLngBounds(southWest, northEast); L.tileLayer('static/b18/{z}/{x}/{y}.png', { maxZoom:22, ...


1

The GDAL osm driver makes use of an osmconf.ini file: http://www.gdal.org/drv_osm.html Within that file, you can uncomment the line #other_tags=no to avoid saving all possible names of Sweden in that database column. By the way, GDAL can read the osm.pbf file directly, no need to extract it first.



Only top voted, non community-wiki answers of a minimum length are eligible