Tag Info

New answers tagged

0

As Russell mentioned in the Comments to the Question above, I had the coordinates wrong: My sql for inserts was fine but the published ArcGIS Service was set at 4326 projections while the data was in Web Mercator 1002100 format. So I created a new .MXD file, exported its data to the SQL Server, then Published the .MXD as a new Service and everything works as ...


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.


3

I believe the general outline (partly tested so far) is: Find the points representing stream sources, as in this answer. Intersect with the polygons table to get a count of source vertices by polygon. Use ST_DumpPoints in conjunction with group by geometry to get a count of each point. The idea being to get a count of how many rivers meet at a given point. ...


2

This is how I'd do it with PyQGIS: In your QGIS ToC, turn off those layers that you want to keep untouched, i.e., leave visible only the layers you want to set the filter to. Now open a QGIS Python console and paste this code: layers = iface.mapCanvas().layers() for layer in layers: layer.setSubsetString('"osm_user" = \'donlaser\'') This should do ...


0

In pseudo code, this should work: select all from polygons (FULL OUTER?) join with points on polygon intersects points (FULL OUTER?) join lines where polygon intersects lines were line.riverid doesn't equal point.riverid group by polygonid count (pointid) > 0 I'm not really sure how to build the query, and I can't test it without a database to test on. ...


2

Okay, I found out why the lat lng data was that strange in this case. For importing the data with osm2pgsql in slime node the additional table named planet_osm_nodes is getting generated and that was the one I used. Without the additional parameter -l in the import statement the coordinates are getting projected in the Sperical Mercator projection EPSG:3857. ...


2

In the absence of knowing the error messages are you getting, here's my take on some initial improvements -- I'm new to this too. SELECT * FROM mytable,node WHERE node.tags @> ARRAY['subway', 'station', 'uic_ref'] and ST_DWithin(geom, ST_SetSRID(ST_MakePoint(mylon, mylat),3857), radius)



Top 50 recent answers are included