New answers tagged spatial-database
You can use Spatial Manager Desktop to import OSM data into PostGIS. Please, watch this post: http://www.spatialmanager.com/import-directly-postgis-databases/ There is a limited trial version ,you can download it here: http://www.spatialmanager.com/downloads/ If you need help on this feel free to tell me. Disclaimer: I work for Opencartis (Spatial Manager ...
AFAIK there is currently no 'best practise' on how you organize the OSM data at your PostGIS backend. There are different database schemas that are tuned for specific purposes: rendering geospatial lookups / reverse geocoding fulltext search / gazetter ... If you have a very specific usecase, you might tweak the OSM importer mappings (e.g. at osmosis or ...
Your logic is correct. This help guide may help you out in the future for using python in the field calculator. There are already valid pythonic answers above I'll post another option, in VB (sometime's it is simplier than python). In field calculator choose "show codeblock" for "Q2" under "Pre-logic script code" write: In VB: if [Q1] = "a" then result ...
Can't try this since I am not near Arc* Try conditional expressions... Make field Q2 active use the python parser and try 1 if !Q1! == 0 else 0 If it doesn't work...never mind
Since you tagged this with python, you can also accomplish this with an updatecursor. Using field calculator in python for multiline statements is sometimes more difficult than the same function in a cursor. with arcpy.da.UpdateCursor("Mange_Waste", ("Q1", "Q2")) as cursor: for row in cursor: if row == "a": row = 1 else: ...
you need to use a block or to write everything in a single line (respecting the indentations) block (with Python parser) def myfunction(a,b): if a == 'a': return 1 else: return 0 then you call the function defined in your block myfunction(!Q1!, !Q2!) note that this is a general solution, but in your specific case you could ...
I use both GraphHopper AND Pg_Routing Pg_Routingis a lot more flexible but is relatively slower (Depending on the size of the area). You can change costs on an edge in real time GraphHopper buids graphs from an OSM Extract and has its own built in web Server, so is very quick to get up and running ..
If you're a very beginner you should try this tutorial of osm2po by @Underdark Osm2po will give you ready to use graph from osm data as sql script file, all you have to do is load it into database via psql -f command. In this table every single record is edge. Every edge has 2 vertices source and target - coordinations of this points are in column x1,y2 ...
You should check the pgRouting project. There is a great step to step workshop/tutorial. http://workshop.pgrouting.org/
Top 50 recent answers are included