openstreetmap

D3.js + osm geojson = black rectangle

时光毁灭记忆、已成空白 提交于 2019-11-29 17:09:03
I am trying to visualize russians regions. I got data from here , validate here and all was well - picture . But when I try to draw it, I receive only one big black rectangle. var width = 700, height = 400; var svg = d3.select(".graph").append("svg") .attr("viewBox", "0 0 " + (width) + " " + (height)) .style("max-width", "700px") .style("margin", "10px auto"); d3.json("83.json", function (error, mapData) { var features = mapData.features; var path = d3.geoPath().projection(d3.geoMercator()); svg.append("g") .attr("class", "region") .selectAll("path") .data(features) .enter() .append("path")

No map shown in osmdroid

雨燕双飞 提交于 2019-11-29 17:07:20
I tried to make an osmdroid project using Android Studio but any map is shown. I have just a blanck grid. In my xml file I put the folowing code : <?xml version="1.0" encoding="utf-8" ?> <LinearLayout xmlns:android="..." android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <org.osmdroid.views.MapView android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" tilesource="Mapnik" /> </LinearLayout> in my .java file I made this onCreate method private MapView mMap; @Override protected void onCreate(Bundle

How to draw circle on the MAP using GMAP.NET in C#

橙三吉。 提交于 2019-11-29 16:05:10
I am using GMAP.NET in c#. I am able to display the map on the form, now i am trying to draw a CIRCLE mouse by clicking on a certian point, keeping the left mouse button and dragging the mouse upto specific place. Once the circle is drawn I want to get its radius in miles from the center point which I am sure GMAP is capable of doing it. I am using Opentstreet maps. I am just unable to achive this functionly, anybody who has played with GMAP control kindly share your experience with some code which will work. Thanks elasticrash The only way that I am aware of that can achieve such a result is

Converting Veins Coordinates to GPS

感情迁移 提交于 2019-11-29 15:48:51
问题 I am using realistic street networks imported from OpenStreetMap for simulations with Veins, for example the Luxembourg scenario from Lara Codeca. Now, to prepare a visualisation (using Google Earth), I want to export the vehicle positions in the simulation from SUMO or OmNET coordinates to GPS coordinates. As material I have the OSM file used for generating the scenario, including the GPS positions of all nodes there. I was hoping to find a simple mapping from the simulation coordinates to

Finding nearest street given a lat-long location

旧巷老猫 提交于 2019-11-29 14:35:35
问题 Is there any such API where given a location (in terms of latlong), I could find whether the given point is on road/street or not. And if possible also gives me nearest street/road to that location. I found API from [Find nearby Streets] -> http://www.geonames.org/maps/us-reverse-geocoder.html#findNearbyStreets , but it just gives solution for US. Help me if u know of any better solution/algorithm. ( I am particularly interested in India.) 回答1: You can use the Google Maps Geocoding API which

How can I get the city borders for a country

守給你的承諾、 提交于 2019-11-29 14:19:11
问题 I want to extract city specific data from OSM for Finland. I have the data for Finland but I need the data for only 5 cities: Helsinki, Espoo, Vantaa, Kauniainen and Siuntio. I could extract the required data for Helsinki, but I need the city borders for the rest of the cities (so I can make a polygon of that). If I have the polygons I can extract the required data with osmconvert Can you help me with information on how to extract the borders for these cities? Do you know any open api that

How to decode encoded polylines from OSRM and plotting route geometry?

浪尽此生 提交于 2019-11-29 14:14:38
问题 I'm using an instance of OSRM (OpenStreetMap Routing Machine) to evaluate distance and time from different points. Using the API, I can retrieve information that I want and need especially the real route as a polyline. Until today, I have plotted straight lines between start and end point. segments( lon_patient,lat_patient,lon_lieu,lat_lieu,col = transp_time,lwd = 3 ) Now I want to plot the polylines. But it is encoded (https://github.com/Project-OSRM/osrm-backend/wiki/Server-api#response-2).

Import OpenStreetMap-Data (OSM-File) to a MySQL-Database / SQL-File

拈花ヽ惹草 提交于 2019-11-29 11:37:59
Intro I downloaded and extracted the OpenStreetMap Source File ( See here ). I have a 400GB XML-sourcefile now, and i would like to (1) insert the data in a MySQL Table OR (2) export this to an SQL file, doesn't matter. What I already did / tried I have the XML File^^ and the MySQL Server (5.6.14) I found the tool Osmosis , to convert OSM data and I installed it I read this post: Read cities and streets into a database without api I also read this post: Is this config is capable to import complete osm planet file? (It is.) I tried to insert the data with osmosis, but it throws an error after a

How to get all roads around a given location in OpenStreetMap?

旧巷老猫 提交于 2019-11-29 11:22:34
Cant figure out how to get all roads for the specific radius at the given location. My current query is <query type="way"> <around lat="55.693309807744484" lon="21.151986122131348" radius="50"/> </query> <union> <item/> <recurse type="down"/> </union> <print/> I tried to add something like this <highway>primary,secondary,tertiary,residential</highway> but it didn't worked See your query on overpass turbo . It does return all ways around the given point. So you seem to have a problem in your parser. If you want to filter for specific highway types then you have to specify a tag as described in

Limit Scrolling on offline maps, in Android

本秂侑毒 提交于 2019-11-29 10:01:24
问题 I got these piece of codes or patches from osmdroid, and I decided to ask for your help guys because i don't have the enough knowledge to combine these codes to come up with on a solution on my problem, Scrolling limit on an offline map. I searched across the web, and modified tutorials. Honestly I tried to modify these codes but i have not found any progress. Basically I have an offline map from mapnik, and a few overlays. I don't know where to properly place these set of codes. Your ideas