Easiest way to get a simple topologically valid network of motorways and trunk roads using OSM and QGIS? - gis

I am trying to find a simple way in QGIS to create a simplified topology of important roads (OSM codes will be highway: [motorway and trunk]) in the bounds of any given polygon with a script or a graphical model;
I've been struggling to wrangle the data between OSM, GRASS (via v.clean) and native QGIS functions like split by lines; harder is probably dealing with the dual carraigeways and motorway access/link roads found in highway interchanges that just creates a mess for the topology.
Is there some straightforward way to do this? I suspect I've been overthinking how to solve this.

Related

How to properly convert GIS shapefile to a road network?

At the outset, let me just add that I am using Anylogic for the first time, please be understanding.
I have strange problem with conversion GIS .shp file to road network.
I follow the directions in the documentation (I'm trying to do exactly the same as in the documentation example):
https://anylogic.help/markup/converting-roads.html
My GIS map before conversion:
My GIS map after conversion:
As you can see, Anylogic generated a lot of road networks for me. It should all be in one road network. For this reason, there are no intersections and this is the biggest problem. It does not generate intersections at all, but joints these roads somehow artificially ...
Can anyone tell me what I am doing wrong? Why no intersections are generated and everything is thrown into separate road networks?
In the example from the documentation, the intersections have been generated.
I am using Anylogic Professional 30 days trial. Previously I was using the Personal Learning Edition version and there was exactly the same problem.
You are not doing anything wrong. It is caused by the shape file structure. AnyLogic can only interpret what it gets and if the data is not formatted correctly, i.e. road paths are not actually connected in the .shp file, it will create separate networks.
So either adjust the shape file or manually combine the networks, there is no other way, afaik.

Suggestion about automatic map creation problem

I have two layers, first one is the ROAD layer and second one is the PARCEL layer as shown in Figure 1. I can get the data both in dxf and shp formats.
My task is to compute the area of intersection between ROAD and PARCEL layer, this is the easy part. I can compute intersection using QGIS or Geopandas easily. However, the difficult part is creating maps for each of the parcel. Sometimes, I have to create more then a hundred maps for each project. For mapping, there is a template that I have to use, which is similiar to Figure 2. Also, some attribute data should be included in the map, such as owner of the parcel.
These maps should be in both pdf and dxf format. Each map should be in A3 size. To be able to produce such maps, what libraries or programming languages should I use? I have experience in geopandas library but I am not sure if it is enough for this task.
Shoud I try QGIS plugin development or ArcPY? Could you please share your experiences and ideas about this problem?
I am looking forward to hearing from you,
Any help and suggestion is appreciated.
Thanks in advance

Plotting huge number of locations on a map

Is there any good library that will enable to see the coarse location distribution.
I have some million data points to plot on a map. Doing it on google maps is going to be heavy. I want this to be like a dot plot.
The closest I can think to the functionality you are looking for would be to implement a heatmap layer : https://developers.google.com/maps/documentation/javascript/examples/layer-heatmap.
This would allow you to see the distribution of points without plotting them individually and thus saving you some client-side work.
How well this will work with a million+ points however I am not sure. You might be best off looking into a fusion tables combination.

Can I get terrain data from anywhere for use in simulations?

Is there a way I can build terrain data in a simple way from sources like Google Maps. I am not interested in heights but a simple 2D representation will be good enough.
For instance, I am trying to represent a terrain using the roads and buildings inside a map to model a traffic simulation. Representing objects like buildings is necessary so that when my cars are moving on a road, they should know when to take a turn etc. Are there any standards for representing these?
There are dozens of map standards. also map data tends to be very expensive, although there are some low cost and open source map sources. Eg. OpenStreetMap, and for the US, Tiger/Line.
I would also read up on, at least, some introductory GIS - I think you'll find the field is much bigger and more complex that you are initially thinking.

2008 TIGER/LineĀ® Shapefiles from Census.gov -> Google Maps

How do I take shapefiles and extract lat/lng coords so I can plot polygons on Google Maps?
http://www2.census.gov/cgi-bin/shapefiles/national-files
I asked this question here:
http://groups.google.com/group/Google-Maps-API/browse_thread/thread/18763b4b0cb996c7
and they told me WHAT to do, but not HOW to do it =P
Thx!
It depends on how you need to accomplish this. If you just need a few shapes, you can look up the coordinates in those files yourself. You can use those coordinates to create a GPolygon in Google Maps.
If you need lots of shapes - you'll need to do it programmatically. I would suggest using your favorite language to parse the XML file and retrieve the coordinates for each shape.
I had a similar problem last year when I was developing a screensaver to render presidential polling data. I didn't really want to invest the time to parse the Shapefiles data on the census site (The spec is here if you missed it).
Not sure if I actually saved any time here, but I ended writing a python app to render the 50 states onscreen, trace the edges and then store the data in a simple text format. Not sure if my data is high res enough for your application, but you can grab the data I generated here:
http://www.cannonade.net/pnt.zip
N.B. The data I generate are not latitude/longitudes, but with some scaling you should be able to translate them.
Good luck.
I had better luck using the ARC files at http://www.census.gov/geo/www/cob/index.html
I can't find the webpage right now, but I did find one that had actual code. Google something like "arc to kml" and go from there.