I have two shapefiles. One is a street map with traffic volume data, another one is a detailed street map (accurate map) without traffic volumes.
when I compare the street map with traffic volume data with the detailed street map without traffic volume, lots of streets in the traffic volume data map do not align well with the actual streets, e.g., streets are straight lines when they should be curves.
I want to assign traffic volumes to streets in the accurate street map.
I have tried this:
a. transform the traffic volume data from polyline to points;
b. spatially join the points of traffic volume to the detailed street map.
This obviously doesn't work because when I join traffic volume points to the accurate street map, some streets have more than one points with different traffic volumes...
How can I approach this problem?
Any suggestions or advice will be greatly appreciated!!
In terms of doing transportation analysis, instead of convert road segment to point you may want to look at using linear reference model to handle this.
http://desktop.arcgis.com/en/arcmap/latest/manage-data/linear-referencing/what-is-linear-referencing.htm
That would solved your problem for multiple data points for one street.
Let me know if it helps.
Related
I have an application which deals with geographical data and, in particular, tracks. Given an area (radius around geopoint, or bounding box of geopoints) I need to find, among of all these tracks, the ones that have points that interesect with said area.
For the tracks, it seems I will be dealing both with EPSG:3857 and EPSG:4326: they are either inputted by map interaction (openstreetmap, which uses EGPS:4326 data but EGPS:3857 for tiles) or GPS data (which is EGPS:4326). As for the area, I have "blank slate", but I think it will come in both forms (user either indicates an area on the map or provides an address and radius. address would be resolved with the android geocoder, which I am assuming uses EGPS:4326.)
How do I go about doing this?
I am currently developing technique to help users find a spot to park.
But i face a little problem:
if a user indicates that he is parking right now in a free spot but he is lying and he is at home right now.
How can i detect from GPS if he is inside a building or along side the road?
Thanks
You'll need map data (OpenStreetMap is free), and figure out whether the user is somewhere on that map or not. You do that by comparing GPS data to the map data.
What I do in such situations is measure the distance between the lat/lon and each road, and compare the GPS angle to that of each line. The more context information you use the more accurate you can get your results:
If the speed is 60km/h, you're probably not in a building. You're probably not on a 30km/h road either.
If you're standing still for more than 2 minutes, you're probably not in a car.
If you know the buildings, and there are only a few of them, you could check if you see a certain wifi router or not.
Basically you'll calculate a score for each road, and then pick the road with the highest score to know where you are.
Score = DistScore*DistWeight + AngleScore+AngleWeight etc.
Also, from iOS and Android you get an accuracy in meters. You can also calculate that yourself if you can access raw GPS data. Using that, you set the area that you need to scan. For example, for a high accuracy (3m), you probably don't have many roads to scan. If the accuracy is 50m, you should probably match roads that are farther away.
If accuracy is important, you should look at series of GPS data, and test if the followed route is a logical path or not.
I want to be able to determine if a GPS location is in an inhabited or uninhabited zone.
I have tried several reverse geocoding API like Nominatim, but failed to get good results. It always returns the nearest possible address, even when I selected a location in the middle of a forest.
Is there any way to determine this with reasonable accuracy? Are there any databases or web services for this ?
If you have to calculate that youself, then the interesting things start:
The information whether or not a region is inhabited is stored in digital maps in layer "Land_Use". There are values for Forest, Water, Industry, Cemetary, etc.
You would have to import these Land_use polygons into a special DB (PostGres).
Such a spatial DB provides fast geo indizeds for searching only the relevant polygons.
Some countries may also fit in main memory, but then you need some kind of geo spatial index, like Quad-Tree or k-d tree to store the polygons.
Once you have imported the polygons, it is a simple "point in polygon" query, or "polygons within radius r". The typoe of th epolygon denotes the land use.
OpenStreetMap provides these polygons for free.
Otherwise you have to buy them from TomTom or probably NavTeq (Nokia Maps). But this makes only sense for major companies.
Since you're using Nominatim, you're getting the coordinates of the nearest address back in the reply.
Since the distance between two coordinates can be calculated, you can just use that to calculate the distance to the closest address found, and from that figure out if you're close to populated areas or not.
I might have gotten in over my head here, and am looking for any possible assistance, as I am really not familiar with writing code. If you can dumb down any possible answers, that'd be spectacular.
I created a Google Fusion Table that lists worldwide sea ports by city and country, and visualizes them on a map. I want to have the ability to type in an inland location and have the map mark the location, and advise the closest one or two seaports.
For example: I enter a location of Richmond, VA, and the map will mark Richmond, VA on the map, and advise that the Norfolk, VA and New York, NY sea ports would be closest.
I'm not sure where to begin to accomplish this. Is this too vague of a question? Any help provided will be greatly appreciated!
You can accomplish this using a bit of JavaScript code. The Fusion Tables Layer in the Google Maps API allows you to find the nearest n neighbors to a latitude, longitude coordinate. An example can be found here:
https://developers.google.com/fusiontables/docs/samples/nn_example
Here are the overall steps you would take to create the app:
Create an HTML page that has a search box plus a map with the Fusion Table Layer displaying the data from your table
When the user enters a search term, such as Richmond VA, you would geocode the string to get the lat/lon coordinate. You can use the Google Maps API geocoding service:
http://code.google.com/apis/maps/documentation/javascript/geocoding.html
When you get the lat/lon coordinate, use this to update the query sent to the Fusion Tables Layer (similar to the example above) to show the 2 nearest ports.
I have a shapefile with a road network and it seems like the roads are all listed as 1 big polyline. Is this typical is it possible to get a road network where the roads are listed individually and have names associated with them?
thanks,
Jeff
If someone sent me a shapefile of roads where all the roads were a single polyline, I would assume the person was playing a practical joke on me.
Typically, a useful shapefile of roads would at least be broken into a single line for each defined road, or even better, a network intersection-to-intersection segment shapes.
It's not a trivial task to split up a single polyline into a more useful multi-segmented shapefile.
Doing a quick Google search returns a couple of free solutions for shapefile editors although I can't vouch for any of them. I use my company's own codebase written in C# using Tatuk for working with shapefiles.
http://www.nrdb.co.uk/nrdbview/
http://www.forestpal.com/blog/?p=21