New answers tagged

2

Got it. Just followed a tutorial available at https://javarevisited.blogspot.com/2012/11/how-to-join-three-tables-in-sql-query-mysql-sqlserver.html and extended the logic from 3 tables to 4. Here follows the code that worked. SELECT users.display_name, current_way_tags.k, users.changesets_count FROM users INNER JOIN changesets ON users.id =...


1

As I know, you cannot use OSM in Geoserver, you need to convert your data to other formats supported by Geoserver. The list of formats is available here. There is a similar thread here that explains that it is not possible.


1

You can use an alternative tile source like Thunderforest which is used by OpenSteetMap https://tile.thunderforest.com/cycle/${z}/${x}/${y}.png or even: https://tile.thunderforest.com/landscape/${z}/${x}/${y}.png For more alternative tile sources see: https://wiki.openstreetmap.org/wiki/Tile_servers


1

{{geocodeArea:Oregon}} is syntactic sugar that was invented by overpass turbo (the web frontend). Overpass API (the backend) doesn't know anything about those shortcuts. See https://wiki.openstreetmap.org/wiki/Overpass_turbo/Extended_Overpass_Turbo_Queries for more details.


4

You can do that with your own DEM and offline by using gdal_viewshed https://gdal.org/programs/gdal_viewshed.html.


1

The QtLocation plugin requires tiles, i.e. pre-rendered map images. .osm.pbf instead is raw data that needs to be rendered first, resulting in these tiles. This means you either have to find an online resource for downloading OSM tiles or you have to render them yourself. For rendering take a look at Maperitive, Kosmtik or TileMill.


3

As per @MichaelStimson I think you can do a viewshed in GEE support.google.com/earth/answer/3064261?hl=en or QGIS plugins.qgis.org/plugins/ViewshedAnalysis - I've not used either so I can't attest to their suitability. Getting elevation data to match your accuracy requirement is important: if you want to get a viewshed that could be ~30m from true location ...


0

Instead of having just: <has-kv k="boundary" v="administrative"/> You should add a line: <has-kv k="boundary" v="administrative"/> <has-kv k="admin_level" v="8"/> I also removed sections for node and way: <osm-script output="xml" timeout="25"> <id-query {{geocodeArea:amsterdam}} into="area_0"/> <union> ...


2

What you really want is to move the LIMIT clause into the pre-fetching, and order the set only for the actual aggregations! With a GIST on way a plain BTREE on highway (no array => no GIN; an index has likely no effect whatsoever) and VACUUM ANALYZE'd prior to execution running SELECT jsonb_build_object( 'type', '...


2

I tried to replicate your workflow and found out that CorelDraw would import the same amount of lines and nodes in my test when importing a DXF file generated by QGIS. Below is the description of how I did it : I have installed the OSM downloader plug-in which is available from the QGIS repository. Using the tool, I downloaded some roads from OSM by ...


1

You can use the OSM API using changesets API endpoint To illustrate for your user, you can use either: To get result by user name https://api.openstreetmap.org/api/0.6/changesets?display_name=m%20ahmed To get result by user identifier https://api.openstreetmap.org/api/0.6/changesets?user=8566797 You can browse aditional options mentioned in the first link ...


5

You have to look at the key = leisure. https://wiki.openstreetmap.org/wiki/Tag:leisure%3Ddog_park this query will give you all the dogparks (if mapped!) /* This has been generated by the overpass-turbo wizard. The original search was: “leisure=dog_park” */ [out:json][timeout:25]; // gather results ( // query part for: “leisure=dog_park” node["leisure"=...


0

If you have tile layer with different tile schema than base layer, you have to define tile grid ol.tilegrid.TileGrid for that layer, where you specify layer extent with extent option and and zoom resolutions (tile resolution for each zoom) with resolutions option. You have to specify these resolutions also in view definition, so they become you native map ...


0

I found another solution. Please add 'region' to you code. boundary country : boundary=administrative AND (admin_level=2 OR admin_level=4) AND NOT natural=coastline boundary province : boundary=administrative AND admin_level=6 boundary region : relation[type=boundary AND boundary=administrative AND admin_level=4] boundary municipal : boundary=...


2

OSM nodes coordinates have 7 decimals. PostGIS stores geometries with 15 decimals. The difference between the two is noise and should not be relied on. In fact, you should instruct st_asText to show only 7 digits. select st_astext(st_transform(way, 4326),7) from planet_osm_line where osm_id = 482283890; There is an interesting note in the doc, hidden the ...


2

I achieved this animation using only CSS. See the following tutorial: https://css-tricks.com/svg-line-animation-works/#article-header-id-7 (Note: the tutorial covers other interesting line animations as well!) First of all add the class .animate to the routing line: var control = L.Routing.control({ waypoints: [ L.latLng(57.74, 11.94), ...


-4

The Maprika app (https://play.google.com/store/apps/details?id=com.maprika&hl=en) allows you to georeference a ski-map to the real world. In the app, you can then see your own location on that ski map, as a dot. Maprika offers design software for your phone (android/ios) and windows pc. It also has a community, so chances are someone has already done the ...


0

I have looked into the problem a while now and found a solution that suits my needs quite well. If you run the GRASS tool r.geomorphon (https://grass.osgeo.org/grass76/manuals/addons/r.geomorphon) on a e.g. an ASTER DEM with water bodies and islands the islands are usually clearly visible as slopes and peaks within the water bodie, classified as flat. I ...


3

Using the https://overpass-turbo.eu/ Wizard and some adjustments, I managed to create a query for retrieving the metadata of a specific way (i.e. id:421427136): /* This has been generated by the overpass-turbo wizard. The original search was: “id:421427136” */ [out:json][timeout:25]; // gather results ( // query part for: “id:421427136” way(421427136); )...


1

Looking at "Adding Openstreetmap to ArcGis 9.3.1" and "Can you use OpenStreetMap tiles in ArcGIS 9.3.1?" topics, the only solution easy to use seems to be ArcBruTile but not free (25 euros) otherwise you should consumes WMS services build with OpenStreetMap data (some in the second provided topic). There is a mention of an Arc2Earth product but the company ...


0

Here is a simple solution using the latest update of the OSMnx package. I followed the implementation from https://github.com/gboeing/osmnx/pull/231/files # pip install rtree, osmnx import osmnx as ox lat = 50 lon = 10 # Download road network as a so-called Graph object # The network will be centered at your coordinate # and includes all nodes in the ...


1

For Mapzen: don't use it as it's for vector tiles 1.0 specification (outdated) For osm2vectortiles, don't use because of legal reasons e.g https://github.com/osm2vectortiles/osm2vectortiles/issues/387#issuecomment-273492760 and instead use OpenMapTiles (it replaces the previous osm2vectortiles) using this quick recipe if you want to generate your own tiles


0

You have swapped X and Y. Try with osmconvert china.osm -b=114.11,22.30,114.22,22.38 --out-osm -o=hk.osm


0

The instructions that you are following from that link to Using OSM Data in QGIS say near their beginning: We assume that you’ve already downloaded and installed QGIS 2.x. You are using a version of QGIS 3.x, and so I think you should look for documentation written for QGIS 3.x instead.


2

You must mix the data_type in the gpkg_contents table with the geometry_type_name in the gpkg_geometry_columns table. "Features" is what you are supposed to see as data_type. http://www.geopackage.org/spec121/index.html#_gpkg_contents The data_type specifies the type of content contained in the table, for example "features" per clause Features, "...


2

Overpass API does not support area in area queries. However, you can define two different areas and use both of them as filter criterion in the same statement: area[postal_code="19300"]->.zip; area[name="Deutschland"]->.de; way(area.de)(area.zip)[highway][name]; (._;>;); out;


0

Somewhat related issue I faced recently, needed two pbfs in the same database so the way I did it is: load your "first pbf" as you normally would into postgres createdb test-U user psql -U user -d test-c 'CREATE EXTENSION hstore;' psql -U user -d test-c 'CREATE EXTENSION postgis;' psql -U user -d test-c 'CREATE SCHEMA osm_public;' psql -U user -d test-f /...


1

The bus stop node 3205201698 is part of the highway 259359975. You can't remove it or otherwise your highway will have a gap. In OSM the geometry of a way is defined by nodes. Both ways and nodes can have tags. This means a node already being part of a highway can represent an additional object, such as a bus stop. Removing this node will remove part of the ...


1

Now that you have a geom, you should be able to add the layer on Tilemill. Enter your request, surrounded by ( ...you request... ) as my_table (the name is not important, but you need one). Be sure, when you add your postgis layer, to enter way_id as your unique id, way as your geometry, and you select the good SRS (by default it should be 900913, which is ...


Top 50 recent answers are included