I have extracted the geometries of all intersections and I want to find all the connections (such as intersection one is connected to intersections two, three, four, five). I was thinking about achieving this by checking if two intersections (points) are on the same LineString. Does anybody know if this is a good way to do so? Is there any functions to call to check if two points are on the same line? Thank you
how to check if two points are on the same line in postgis
1.2k Views Asked by daydayup At
1
There are 1 best solutions below
Related Questions in POSTGRESQL
- Why does adding a JOIN completely modify the query planner behaviour?
- When dealing with databases, does adding a different table when we can use a simple hash a good thing?
- Aggregate and count in PostgreSQL
- Rails HABTM: Select everything a that a record 'has'
- Trigger using data from inserted row
- Select results where joined table contains records with an attribute, but without another
- DB candidate as CouchDB/Schema replacement
- How do I properly add data in SQLAlchemy?
- Postgres in Conda Environment (Ubuntu 14.04)
- How to customize the output of the Postgres Pseudo Encrypt function?
- Split a large query (2 days) into pieces to increase the speed in Postgres
- Why does pg_search prefix not work like I expect?
- extracting meta info from a table psql using information_schema
- How to query a table in the database and copy it's data into one one?
- Update a table using info from a second table and a condition from a third table in Postgresql
Related Questions in POSTGIS
- Play Framework Unable to build entity manager factory when Working with PostGIS
- ST_SetSRID ST_Point PostGIS giving strange output
- Create a Geoserver layer with data from a Postgis SQL view with Python/gsconfig
- NoMethodError using activerecord_postgis_adapter
- Access PostGIS functions in PyCharm Database Navigator
- how to detect polygons within other (many) polygons in postgis
- iterate and write separately linestrings (generate_series)
- What is wrong with this ST_CONTAINS statement PostGIS - Find point in polygon
- Accurate Bounding Box From Geography Polygon
- Getting Postgis/JDBC to work with BoneCP in Spring
- How do you pass in timestamp variable into JDBC request for jmeter
- PostGIS only works with root user
- Symbol not found - POSTGIS on PostgreSQL 9.3.3 Mac OS X 10.10
- Cannot CREATE EXTENSION postgis, $libdir/postgis-2.1 not found
- Using psql options in npgsql
Related Questions in INTERSECTION
- Math/Physics: Given angle and vector find point of intersection?
- Java 2D game random rectangles
- How can I find a common volume of three cones intersecting each other in MATLAB?
- creating polygons based on intersection
- Ray/Rectangle intersection in 3D space
- Intersecting many Points with many Polygons
- Program not outputting data correctly
- Getting Geometry of Intersection of Road SQL and Inserting Into Table
- Finding n numbers common over N lists
- Intersection of data in oracle
- How to split a self-intersection polygon to multipolygon
- Find the Intersection points of 2 rectangles
- how to check if two points are on the same line in postgis
- How to Check intersection between two images on a specific location?
- SVG intersection of elements with transforms
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If the two points (or any number of points) are in a Multipoint you can use ST_Contains(Linestring, Multipoint) which will return true
http://postgis.net/docs/manual-2.1/ST_Contains.html
You will need to collect up your pairs into multipoints first, which will be a number of multipoints proportional to n^2 if you want to test all possible pairwise sets, which could be prohibitive. In that case, I would generate a table matching up points to each linestring that contains them, and then aggregating that table grouping by linestring.
See also http://postgis.net/docs/manual-2.1/ST_Relate.html for a more general test of spatial relationships between objects.