Tag Info

New answers tagged

4

I'm not familiar with programming in JavaScript but in the OpenStreetMap Wiki there is a section describing "Mercator". Following this link you'll find a sample code snippet to tranform from lat long to mercator. I actually don't know if it's correct because I did not test the code.


0

If you intend to do routing on a Network Dataset in ArcGIS for Desktop using OSM data, you should really have a look at ESRI's Open Source and free "ArcGIS Editor for OpenStreetMap". It contains specially designed tools to create a routable Network Dataset from OpenStreetMap data, that deals with the specifics of OSM data in this area. ArcGIS Editor for ...


1

Depending on your configuration, setting wtr.finalMask=bike rtr.supportedRouteClazzes=bicycle filters all cycleways and adds ways referenced by Bicycle-Relations. You'll find the extra info in the meta-column of the *_4pgr-PostGIS-Table. In order to modify costs, you'll have to overwrite the DefaultJoinFilter.validate(Way way) -method.


1

I finally solved the problem with the following code: I left the code (almost) as it was before (especially the proj4) and as it is in the question. I then added the following: lat_min = 47.975 lon_min = 7.8 lat_max = 48.0 lon_max = 7.875 x_min = 6378137.0 * num * lon_min a = lat_min * 0.017453292519943295; y_min = 3189068.5 * math.log((1.0 + ...


2

The ArcGIS network analyst extension needs a properly prepared network dataset (graph) for routing. Ordinary OpenStreetMap data sets are not routable because they are simple linestrings. Take a look at the OSM2NetwordDataset tool by Eva Peters. This tool creates a routable network dataset and takes turn restrictions (from OSM relations), oneway roads and ...


4

As you query to have only nodes it is that all you get. See http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide#Nodes for more details. Your query should be http://overpass-api.de/api/interpreter?data=(node(52.06,5.04,52.08,5.06);<;>;);out;


3

No, it's not possible to recycle the database, as both tools do very different tasks and therefore they create very specific datastructures to run nice and smooth. Please import another time your DB dump for mapnik, as explained here: www.switch2osm.org


0

Have a look at this webservice by imagico.de: http://www.imagico.de/map/boundaries_download_en.php They offer boundaries as shapefile, based on OSM data. If you want boundaries for only a few countries and maybe also its inner boundaries, have a look at https://osm.wno-edv-service.de/boundaries/ ... there you can choose one or more boundaries and export ...


0

Try a projection: for the map, or at least for the image source. €: To import a non-georeferenced image, you need to change the source to ol.source.ImageStatic() see http://jsfiddle.net/k7yybgLm/1/ for an example with a wms & a static overlay. €2: Coordinates for your static image depend more or less just on the size (width/height) of your image and ...


0

SQL queries themselves are part of carto-css project. You can find them here


1

Nominatim and Mapnik/renderd use different database schemes, so you better put them in separate databases. See Can we use existing plant database for Nominatim for more details. Unfortunately, noone has ever documented the nominatim database scheme yet.


0

I downloaded OSM vector data from Geofabrik website. For the time being, i downloaded OSM vector data. I filled usefull field (speed_profile) for driving isochrones. On my windows 7 32 bits, Grass 7.0 and postgres/postgis have been installed. I loaded my OSM roads network into my Grass db. And i made a test with v.isochrones plugin. up to now, i did not load ...


0

I'm sure this function is incredibly inefficient (not to mention that it's coded very poorly -- it was written as a "once-off" quick and dirty implementation), but here's one whose results work quite well for me: CREATE OR REPLACE FUNCTION public.calc_colors( tbl text, unique_field text, neighbour_style text, search_distance real DEFAULT 0) ...


3

Check out the Overpass Turbo API. Use the wizard to simply search for your desired OpenStreetMap routes using their location or the route's osm-id and then press the export-tab. There you can choose "KML" as an export format.


3

You can use an intersection of the features. You can find it here: Vector > Geoprocessing Tools > Intersect... As the input layer you use the roads. As intersect layer you use the provinces of the netherlands. Either you can make a filter for the province you need or you select the province and check the Use only selected features box. Then you can ...


1

In the example of Anita Graser the st_distance function is used in combination with min() to get the nearest node for every airport.if you have the id's of the nearest nodes you can loop through your table and use this id's for the pgr_drivingdistance function. You can also have a look at the following three links where you always find a good answer from ...


0

I just searched via Google and found a page entitled OSM in Google Earth which says: Look at Query-to-map to select small parts or single objects of OSM and show them as KML also in Google Earth. I recommend reviewing the Query-to-map page.


1

You could use ST_LineMerge http://postgis.net/docs/ST_LineMerge.html First you need join all your ways into one MultiLineString using ST_DUMP http://postgis.net/docs/ST_Dump.html and ST_Multy Afterwards use ST_LineMerge to get a set of Linestrings of maximum length sewed from segments.


0

You can download city boundary data from the US Census TIGER/Line shapefiles web interface (https://www.census.gov/cgi-bin/geo/shapefiles2014/main). Use the dropdown and select "Places" - you can download them for an entire state then query the attribute table for the cities you're interested in.


1

Maybe you could rely on osm2x3d project. Demo here: http://web.osm2x3d.net The main feature is to convert osm xml data to x3d format (3D scene graph). Also using x3dom js library, it allows to render the result natively in a web browser.


0

I'm trying to do exactly what the OP asked, but going from AndreJ's answer, I get this error: ERROR 1: Attempt to create 0x0 dataset is illegal,sizes must be larger than zero. What does this mean and how can I get around this?


1

The default.style file https://github.com/openstreetmap/osm2pgsql/blob/master/default.style does not pick maxspeed into its own column. Edit default.style or use the --hstore option for writing all the tags into hstore.


2

There seems to be something wrong with the style file option. Try: F:\randomGISstuff\ethiopia>osm2pgsql -c -G -U postgres --hstore -S F:\randomGISstuff\ethiopia\default.style -U postgres -d ethiopia ethiopia-latest.osm.pbf If the user needs to give a password, you might have to put it on the command line as well. It might help to always give the full ...


0

in SQL Editor create db 'gis' -- Database: gis -- DROP DATABASE gis; CREATE DATABASE gis WITH OWNER = postgres ENCODING = 'UTF8' TABLESPACE = pg_default LC_COLLATE = 'English_United States.1252' LC_CTYPE = 'English_United States.1252' CONNECTION LIMIT = -1;


1

I would recommend the following approach: it returns coordinates for ways' nodes 'in place', like you described in your question. The only thing, which is missing in the output is the technical OSM node-id (ref). I assume that for use case of drawing some boundary area on a map, this is most likely not needed. If you take a look at the screenshot below, ...


1

Maybe you can find some hints and solutions in this blog posting by the developer of the OSM-based routing solution Graphhopper. His project with your aim is called Map Matching


2

When you define your vector source, put the projection setting pointing to the target coordinate reference system (see the docs): new ol.layer.Vector({ title: 'added Layer', source: new ol.source.GeoJSON({ projection : 'EPSG:3857', url: 'mygeojson.json' }) }) Look at this example (using your sample data): ...


0

I think I found a better way then the proposed ones (better because easier and less invasive): If the file /var/lib/mod_tile/planet-import-complete exists, its modification timestamp determines if cached tiles can expire or not. If the file timestamp is older then the cached tiles, they will not be regenerated. According to this posting by Frederik mod_tile ...


0

Try the following: Copy your overpass-api query to clipboard go to https://overpass-turbo.eu paste your query in the left screen by deleting any other content before there. Run your query on that service, wait that an alert comes up about missing information to display nodes from OSM objects agree to auto-repair your query Re-run your query in ...


2

Have a look at mapsforge ... this framework uses offline vector map files based on OpenStreetMap. next to the source code on github, there is also a quite active mailing list on googlegroups. On github you can find some wiki articles how to start, and also a sample app with all basic feeatures.


0

Would "Radius Around A Point On A Map" do what you want? You can generate a map URL or download the KML for a given point and radius. http://www.freemaptools.com/radius-around-point.htm


1

You could use leaflet, an open source JavaScript Library for interactive maps. It supports drawing circles on a webmap using the circle-class. All you need is the geographical point and the radius in meters. You can find a simple example in the quick start guide.


1

I guess most tools around the rendering stack rely heavily on WGS84 and so it might be not a good idea to alter the projection of the metadata. Instead I would recommend to reproject the rendered image itself? Doing it on the data level seems to be very tricky: http://wiki.openstreetmap.org/wiki/Mapnik_GB_Projection


1

Answering my own question here in the hope that this helps others (or my future self). In the intervening weeks since I posted the question, I was unable to find an elegant solution to this problem that could be done algorithmically in PostgreSQL. Instead, I broke the task down into constituent parts and more or less brute-forced it. For the purposes of ...


1

What you are after is a good map-matching algorithm. There are very few available off the self: see explanation and description on OSM. In case you're interested in simply using an API for that purpose, have a look at TrackMatching on my profile.


1

I've had good luck using the 6-color algorithm described in the introduction to Two Linear-Time Algorithms for Five-Coloring a Planar Graph. Although it's certainly possible to color a graph using fewer colors, it may not look any better than using 5 or 6. ALGORITHM 6-COLOR. Given an n-vertex planar graph G in adjacency list form, this algorithm ...


0

Would it be possible for me to add my own roads to my own osm MAP ? I have added my area of Ireland to a postgres database and I plan on using pgrouting for routing, but would it be possible for me to add any new roads I find to the data and for them to considered when calculating the shortest path ?


1

Finally I decided to use Quick OSM plugin, which allows you to make a query based on a territory name or a layer (which can contain vectors).


0

An incomplete and partial answer I'm afraid - but it may point you in a helpful direction: I've had multiple problems trying to print with a background based on the Openlayers plugin. The solution for me was to find a service which allowed me to download glued-together and georeferenced tiles from the web mapping I needed. For me this service is 'Bigmap' ...


0

Osm2PgSql will only import polygons into the planet_polygon table if they are closed. You may find the missing data in the planet_lines table Use OverPass Turbo or OSm to get the osm_id of the missing geometry and search for it in the polygons and lines table's. This will tell you if they were actually imported. If they are not in those tables, they were ...


1

You didn't tell us how name and ref are related in your query but in case you want to get all objects with a specific name AND ref value then try this query: [out:json] [timeout:25] ; ( node ["name"="John F Foran Freeway"] ["ref"="I 280"]; way ["name"="John F Foran Freeway"] ["ref"="I 280"]; relation ["name"="John F Foran Freeway"] ...


0

The QGIS threejs plugin is able to turn OSM data into 3D: http://www.cartografia.cl/beta/index.php/home/sig/891-generar-edificaciones-en-3d-a-partir-de-un-shapefile-con-qgis Another chance is povray: http://wiki.openstreetmap.org/wiki/User:Maxbe/Relief_mit_POVray http://blog.openstreetmap.de/blog/2012/01/wochennotiz-nr-80/ You might need Google translate ...


0

I suggest my new project: osm2x3d. My code is c++. It transforms osm data (xml) to x3D data (xml).


1

Openlayers should fit your need, but I don't know what kind of "gis files" you want to deal with. Consuming and displaying 256x256px tiles is easy, but storing a whole country offline will slow down any application.


1

planet_osm_node contains the point data in the same way they are stored in the OSM database. These nodes can contain attribute information, or are just part (vertices) of ways. planet_osm_point is a subset of the node table, containing only the points with attributes, but not the vertices. Furthermore, it has a geometry column to use with GIS applications. ...


0

The planet_osm_point table is used much more often (than node) in documentation and examples, transforms the OSM data from an EPSG 4326 production to EPSG 900913 projection, and I've never used planet_osm_node in my work of using OSM data in applications Tilemill and qgis using the osm_point This schema page on the osm wiki has some vague answers on the ...


2

Actually there isn't anything called an osm_id, at-least not officially. In the OSM database, each node, relationship, way etc have a unique id.This uniqueness is only within a particular element type. i.e. there could be a node with id 1023, a relationship with id 1023 as well as a way with id 1023. These are often called the OSM ID for that particular ...


0

From the quoted forum entry: The place_id is an internal id for nominatim. It is necessary because POIs can be stored in the database as points or closed ways (areas). The place_id allows nominatim to search for both data types in one table. For all other use cases, take the osm_id.


1

Not sure it is what you are looking for, but here is a start with this workaround (based on this answer): library(osmar) osm_data <- get_osm(complete_file(), source = osmsource_file('extract.osm')) hw_ids <- find(osm_data, way(tags(k == "highway"))) hw_ids <- find_down(osm_data, way(hw_ids)) ways <- subset(osm_data, ids = hw_ids) way_ids <- ...


0

Check out TileMill's documentation on Symbol Drawing Ordering. In short, preference is given to lower labels, so in your case #mainroad_label has a higher priority than #stations, which is why you need to add marker-allow-overlap: true; to #stations in order to get it to display. Try moving #stations below #mainroad_label, and as long as you don't add ...



Top 50 recent answers are included