Tag Info

New answers tagged

1

You can create an empty (completely transparent) image and provide it as the URL to a XYZ tile source: new ol.layer.Tile({ source: new ol.source.XYZ({ url: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIHWNgYGD4DwABBAEAHnOcQAAAAABJRU5ErkJggg==" }) })


0

It works now! it was not a failure in my pc, I guess it was an error from the OSM, and they fix it. thanks anyway. Yesterday I use this page https://mapzen.com/data/metro-extracts/ to get the layers, is good.


1

The Overpass API server you are using is currently down, see platform status. There are other Overpass API instances available which you can try, assuming that QGIS allows to configure the server address.


0

In the meantime I created a small python-based library that can create simple static images. You can find it on github: https://github.com/komoot/staticmap


1

It requires ArcGIS, but see my detailed response here in another GIS StackExchange thread regarding building networks and simplifying data while maintaining the topological structure: Building Large Network Datasets from OpenStreetMap in ArcGIS?


2

If your interested in using a microservice that you can run yourself, instead of a library check out https://github.com/trailbehind/StaticMapService/. You can install background layers into it, then post GeoJSON and get back map images. You mentioned facebook preview images, and that's exactly what I wrote it for. The image url points at a public web server, ...


1

You can find some hints in the open source code of the JOSM editor, that program has a way-simplify-feature inside. Or have a look at that JOSM plugin named RemoveRedundantPoints


2

No features at that location! center_bbox takes the arguments center_lon, center_lat, width, height - looks like you're requesting a box centred on 53.3528, -0.4468. That's off the coast of Mogadisho, all blue water, and no features, on OpenStreetMap: Looking at 'bb': left bottom right top 51.3213580 -0.4784529 51.3842420 ...


1

The area will be in the units of your map projection. Default is EPSG:3857 -> meters map.getView().getProjection() will get your the information


2

I guess it's better to answer here than comments on your question: 1) As mentioned source and target are integers that are unique identifiers for starting and ending points of your edge. So if an edge joins with another they share a point in common and you'll see the id repeated. This is a very fundamental piece of routing since travel stops are at the ...


0

I assume the whole planet file is just too big for mkgmap to process, so for a worldwide basemap you would be better off to filter the data before processing. It might be a better idea to get a worldwide dataset from Natural Earth and convert it to OSM format for mkgmap processing. BTW the lower zoom levels of openstreetmap.org are not rendered from the ...


0

Yes, OSM provides boundaries if you pass the parameter polygon_geojson = 1, I use MapQuest webservice which is a mirror of OSM: var mapquest_search = 'http://open.mapquestapi.com/nominatim/v1/search.php'; var params_mapquest_search = { params : { polygon_geojson : 1, 'accept-language' : 'pt-BR', addressdetails : 0, format ...


0

I resolved this issue in a different manner (this is an approach for relatively sparse tiles). The first time I load the tiles, I send an AJAX call back to the server and walk through the tiles directories sending back the existent tiles in a list. This list format matches the way your api request the tiles. Then, before requesting a given tile, I look ...


0

Mapzen provides boundary data for all admin levels extracted from OpenStreetMap data as GeoJSON, divided by country as part of their Borders project. The data is available for download at https://mapzen.com/data/borders/


1

Baed on the Openstreetmap database, there is a service https://osm.wno-edv-service.de/boundaries/ which lets you select and download boundary data in various formats. Just expand the nodes on the left panel of the countries you want. If this is too slow for you, take the data from http://www.gadm.org/country or http://www.naturalearthdata.com/downloads/.


1

You can export data for several boundaries from the main OSM database. Administrative boundaries are complete in OSM for admin_level=2 that are for whole countries, and they are very up-to-date. The deper you go in admin_level there are countries that have 100% coverage for each place region, other countries still have some gaps. When using data from OSM, ...


1

I have resolved this issue. Go through this link and follow all the instructions posted there. Problem Resolved


3

The purpose of a tile server is to deliver tiles (raster images). If you want to geocode then use/install a geocoder, for example Nominatim. If you want to access raw data then use/install a service offering raw data, for example Overpass API.


0

In case anyone else is looking to do something like this with OSM data, here is a overpass query that selects all tollbooths in Virginia and gives you a CSV file with lat/lon http://overpass-turbo.eu/s/aTR [out:csv(::"id", name, ::lat, ::lon)]; area ["admin_level"="4"] ["border_type"="state"] ["name:en"="Virginia"] ({{bbox}}); node ...


1

I have resolved this error: The problem is still your pg_hba.conf file (/etc/postgresql/9.3/main/pg_hba.conf). This line: local all postgres peer Should be local all postgres trust After altering this file, don't forget to restart your PostgreSQL server. If you're ...


1

The problem you ran into has nothing to do with carto, it's an issue with your shell command, when you run sudo carto project.mml > OSMBright.xml carto runs as root, but the file write happens as your normal permission level, to do what your looking for you can sudo sh -c "carto project.mml > OSMBright.xml"


1

I resolved the error by following these steps: Step 1- Create a new file OSMBright.xml in the same folder. Step 2- Type 'ls -l' and see the read and write permission of OSMBright.xml file. Step 3- sudo Chmod 777 OSMBright.xml and it will change the read/write permission of the file. Step 4 - Now do sudo carto project.mml > OSMBright.xml and output ...


0

What worked for me is to use geopy (python library). This library can use both google maps and nominatim geolocators. You can query both geolocators and compare them. If nominatim fails at junctions, you can pick Google for those entries. Based on my experience Google Maps API is somewhat more forgiving on incomplete or more complex queries. ...


0

Have a look ath these instructions from a mapbox article: osm-bright-ubuntu-quickstart There is a section with hints for setting right permissions for database access. Maybe the issue is hidden there?


2

try to add this text-dy: -10; you can look at file admin.mss in openstreetmap-carto project dir and find code #nature-reserve-text[zoom >= 13][way_pixels > 192000] { text-name: "[name]"; text-face-name: @book-fonts; text-fill: green; text-halo-radius: 1.0; text-halo-fill: rgba(255,255,255,0.6); text-placement: line; text-dy: -10; } ...


1

The following code might seem a little long-winded as it represents a manual approach rather than relying on OpenStreetMap, but maybe it's of any help to you anyway. I took the country boundaries and the referring country labels from the wrld_simpl dataset (class 'SpatialPolygonsDataFrame', projected in EPSG:4326) that comes with maptools. The shapefile data ...


2

If you reproject a raster with labels, you will obviously get squeezed labels. The only way to avoid this is to render the raster from vector data directly into the desired projection. You might want to look into mapnik, tilemill or maperitive to do this from Openstreetmap raw data (which is vector data). The R openstreetmap package only offers raster ...


0

highway=footway is used for paths between roads or through parks. highway=path is used in a similar way (with some debate) for smaller paths that are unpaved but have been worn into grass. highway=pedestrian is used for wide roads that have been "pedestrianised" so vehicles are not allowed to drive down them (except maybe for deliveries). They are also used ...


1

The Pelias Geocoder from mapzen runs on elasticsearch, and uses OSM data by default, though it can use any data source. The importers are split into separate modules, so even if your not interested in using the pelias geocoder, you may still find the OSM importer useful. On another note: Shapefiles of OSM data are probably not what you want for source ...


1

Take a look at https://github.com/kiselev-dv/gazetteer/tree/develop/Gazetteer It will create you a json index for osm file. And you could use https://github.com/kiselev-dv/gazetteer/tree/develop/GazetteerWeb as an example of geocoder based on ElasticSearch


0

It seems to me, that you can't do it with osm2pgsql. You may: Use osmosis http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage_0.44 but it uses different db schema, and there is no such thing as separate import of changesets into sole table. Do it yourself. It's actually quite easy to use SAX xml parser to get changesets and their tags. Just don't ...


0

You need one more step which is adding the values to your style file. For details: http://wiki.openstreetmap.org/wiki/Osm2pgsql#Import_style Default Style file: https://raw.githubusercontent.com/openstreetmap/osm2pgsql/master/default.style


0

MapBox Studio creates and edits CartoCSS style-sheets, and mapnik uses their own SLD xml styles. Here is a small info about CartoCSS https://github.com/mapbox/carto Magic actually happened in this line: carto project.mml > mapnik.xml If you still can't get output form mapnik, run renderd with -f option, which will bring it in foreground and you will ...


1

You need a part of the answer for ways. Ways in OSM are ordered lists of node references. So the part of the answer what you need should looks like: <way id="22940464"> <nd ref="272304964"/><!-- First node --> <nd ref="273206415"/><!-- Second node --> <nd ref="273206424"/> <nd ref="1827734835"/> ...


0

Generally speaking, yes, Tilemill does not really support static maps, and its native resolution is web resolution – as you have noticed. The basic workaround is: print more pixels (which makes everything smaller) increase the map Scale Factor (which makes everything bigger) I find you have to experiment a bit, but the process is basically: Export ...


0

you should give maperitive a try. Its free software for windows (but closed code). with a very friendly and helpful community - and a reasonable good documentation of the software: maperitve homepage with download: http://maperitive.net/ two minutes intro to maperitve: http://maperitive.net/docs/TwoMinutesIntro.html maperitve users group: ...


0

from what I understand, you have a single ungeoreferenced image, and you want to find the extent. This can be done in QGIS QGIS - Using Capture Coordinate If this is an urban map with details in the corners, you can manually match up the corners using the Capture coordinate plugin. start with an empty project Install the OpenLayers plugin (this goes in ...


3

I tried an imagery from OpenAerialMap and it aligns with the OSM building layer well. Of course, buildings in OSM, most probably, were traced over this OpenAerialMap images, so they match them. All satelite images could have alignment errors (as well as data traced among them). The quality of image referencing connected with: Relief and Digital ...


6

You can keep all of your code private. OSM's license only applies to its database, i.e. raw OSM data. But beware: If you use raw OSM data and add own information to it then you are creating a derivative database. This derivative database then has to be made available under the same licence as OSM data (the ODbL). And of course: IANAL. See the Legal FAQ for ...


2

Try using Overpass API and for playing around the overpass turbo frontend. Example query: [out:xml] [timeout:25]; way["highway"](51.0634071197396,13.773078918457031,51.12550562618459,13.905601501464844); out body; >; out skel qt; Visualization on overpass turbo (might be slow in your browser!) Raw data as XML Please note that the other API you ...


2

You are not giving a whole lot of information here... What version of the ArcGIS Editor for OpenStreetMap are you using? The latest version has seen some major improvements in terms of processing speed, and added much better multipolygon handling, meaning you get more accurate and better polygon output, close to what osm2pgsql achieves. Still, especially ...


0

Using pg_dump and pg_restore is a recommended method when you have access to a powerful development machine, a less powerful production server, and sufficient bandwidth between them. I used a modified version of this method to create a simplified database dump for stylesheet development on less powerful machines. This method brings a few advantages It's ...


0

As an answer to both Uffe Kousgaard comments about "what the 18GB file contains" compared to a routable shapefile, and a possible answer to this question: You don't explicitly state it, but I guess you used the ArcGIS Editor for OpenStreetMap to convert your data. If not, I really recommend to have a look at it, as it contains a dedicated option to create ...


2

If you don't want to zoom before around Heidelberg and if you are pretty sure that only one object is called Umweltzone Heidelberg, you can set a quick query like this : key name value Umweltzone Heidelberg in : empty value. This will create only an attribute query, not a geographic query. This kind of query is very quick. <osm-script output="xml" ...


0

This example uses open cycle map tiles. So yes, you can create and use your own rendering styles. In switch2osm.org tutorial related section is Stylesheet configuration. You could write mapnik style xml stylesheet or convert it from carto-css project. This step actually converts carto-css to mapnik xml. carto project.mml > OSMBright.xml You could use ...



Top 50 recent answers are included