Tag Info

New answers tagged


Since you are searching for identical points only, the bounding boxes intersect operator "&&" will be most efficient. In case your tables don't have spatial indizes, create them: CREATE INDEX ON r USING gist (geom); CREATE INDEX ON e USING gist (geo); Then for each linestring lookup the matching endpoints and the bigger km value: UPDATE r SET ...


In Postgres column and table names are not case sensitive and everything is converted to lower case before executing the query, see the docs. Therefore, SELECT SomeColumn FROM SomeTable becomes SELECT somecolumn FROM sometable unless you write it as SELECT "SomeColumn" FROM "SomeTable" In my view this is messy, especially when dealing with SQL ...


The alternative is the use an AND/OR statement: "Column_Name" = 'Value_1' OR "Column_Name" = 'Value_2'


One method is to use the IN function followed by your list of values all inside brackets. E.g. "Column_Name" IN ('Value_1', 'Value_2', 'Value_N') Hope this helps!


First you should verify the source of the table - this will make sure it's not somewhere that you don't expect or intend. Do this by opening the properties window for the table and going to the 'Source' tab. Make sure that the table ended up in the place you're looking. If you can verify the source but still can't see it in the database - try refreshing ...


If you've got a polygon you want to use as a declared variable and intersect it with a table containing existing geometry, your query (including your polygon variable declaration) would look something like this: (MSSQL Server syntax) declare @polygon geometry = 'POLYGON((-9486683.581 4810152.256, -9282073.762 4821688.121, -9262037.786 4625578.413, ...


Although it's a long time since the question was asked, I'm struggling to find a satisfactory answer. It seems that the questioner (and me!) are trying to perform directly on a shapefile the equivalent to the SQL statement: SELECT * FROM <Layer1> WHERE <Layer1>.<field_x> = <Layer2>.<field_y> I have found a way to do this in ...


[timeout:25][bbox:{{bbox}}]; ( way["highway"="motorway"]; way["highway"="trunk"]; way["highway"="primary"]; ); out body; >; out skel qt; See it on overpass-turbo: http://overpass-turbo.eu/s/aTL


You can do this easily using a regular expression match. Try using the expression: regexp_match( "ADDRESS", '^[A-Za-z].*') This will select all records where the ADDRESS field begins with an upper or lowercase letter. The second argument is a regular expression - it specifies that the string has to begin '^' with a character in the range '[A-Za-z]', and ...

Top 50 recent answers are included