You could use ST_Touches instead:
ST_Touches — Returns TRUE if the geometries have at least one point in common, but their interiors do not intersect.
ST_Touches returns TRUE for eg
Getting the counts should work something like this:
SELECT a.id, count(*)
FROM polygon_table as a
JOIN polygon_table as b
GROUP BY a....
According to Mike Bostock (and other contributors to the TopoJSON extension):
TopoJSON is an extension of GeoJSON that encodes topology. Rather than representing geometries discretely, geometries in TopoJSON files are stitched together from shared line segments called arcs. TopoJSON eliminates redundancy, offering much more compact representations of ...
PostGIS topology has been a big topic in last weekend's 6th QGIS Developer Meeting
Sandro was able to relay a lot of incredibly useful and detailed insight into the PostGIS topological data model to other developers which will prove invaluable in the future as we adopt this new PostGIS capability within QGIS.
More information is available on Sandro ...
I encountered similar issues as well with polygons. Maybe you have a similar problem.
Error Message by ESRI: "Invalid Topology (Incomplete Void Poly)"
Actual Error: "Invalid Geometry"
Fix: Run "Repair Geometry" (changes data in-place, be careful, there is no undo)
What happens is that the error reported is not using the ESRI terminology of Topology/...
The new Topology Checker Plugin will be available in the next release. You can see it at work in this video:
More info: https://github.com/qgis/Quantum-GIS/pull/356
You can use the GRASS Toolbox for that.
Cleaning of topology of a SHAPE file using the GRASS Toolbox
Load the SHAPE file into QGIS
Use existing GRASS mapset (or create a new one) with matching projection settings
Now you have to transfer the SHAPE file from QGIS to GRASS using Toolbox -> File management -> Import into GRASS -> Import vector ...
Enable Topology Checker Plugin in Plugin Manager. Add your polygonal layer in Topology Rule Settings window, select "must not overlap" rule and add them. To see overlap errors click on Validate button.
I think what is happening is that your self-intersecting polygons becomes MULTIPOLYGONS when buffering.
you have two options:
1 remove the constraint "enforce_geotype_the_geom", you can do that in pgAdmin
2 put the result in a new table instead of updating the old. that is often a good way of doing things because then you don't change anything in your ...
CREATE EXTENSION postgis_topology;
... like always, it is when you ask the question that you found the solution... I wasn't because of the installation but topology has to be activated for every database you want to use id with...
There are TWO "right hand rules" (well, scores, if not hundreds, but the direction of magnetic force induced on a positive charge isn't relevant to this discussion).
One asserts that vertices be ordered in rings so that, if you walked the perimeter, with one hand within the figure, and one hand outside, that the right hand be inside: the exterior ring is ...
Very few contiguous cells in a detailed DEM will have identical values of both slope and aspect. Therefore, if the input features represent contiguous areas of common slope and common aspect, we should expect the result of this intersection procedure to have, on average, almost one feature per cell.
There were originally 65,000 * 1000^2 = 6.5 E10 cells in ...
This can be done using a MapTopology.
Although you cannot create or edit geodatabase topologies with ArcView
(only ArcEditor and ArcInfo), you can create and edit map topologies
Create a new Add-in button and copy the code from below.
Add the roads layer to the map and start editing. Open the topology toolbar and create a map topology. ...
Couple of suggestions:
Run Check Geometry tool on your layer that you wish to clip, you could then follow that up with a Repair Geometry if it finds errors. You may wish to do that on a backed up copy.
Check whether the coordinate systems are different. Perhaps you are trying to Clip a dataset in Decimal Degrees with a dataset that is in Meters or vice ...
"Back in the “olden-days” GIS users, particularly ArcInfo users, were well versed in geospatial topology because of the coverage" (Geospatial Topology, the Basics)
But ESRI is not the only solution:
From these beginnings (at the same time as ArcInfo), GRASS GIS is also a full topological GIS with rules that differ from those of ESRI:
The topology in ...
Hypsography concerns the land's elevation, altitude or height above sea-level or some other reference surface. (Hypso is derived from the Greek Ύψος for height.)
Topography concerns physical and cultural features of the land and so includes hypsography, hydrology, the built environment, major boundaries, communication channels, etc. (Topo is derived from ...
Topology functions are stored in the topology schema, topology data (edges, faces, nodes, relations) are stored in a user-defined schema, and relations (topo id, layer id, element id, element type) are stored with the geometry data.
From the command line you can view tables in the topology schema with:
Yes - there is no restriction on the actual shapes or positions of the polygons in a shapefile. The only real restriction is that you can't mix geometry types in a shapefile (so no points & polygons).
While it is good practice not to have self intersecting polygons in there I don't think the spec actually forbids it unlike some other formats.
The most successful way I've ever had of correcting topological errors in QGIS is actually to use GRASS. You can either:
run v.clean from the processing toolbox (manual here https://grass.osgeo.org/grass73/manuals/v.clean.html);
use the 'Repair Geometry' plugin (which is an automation of the v.clean tool); or if all else fails
import the dataset into GRASS ...
For a solution avoiding ArcGIS, use pysal. You could get the weights directly from shapefiles using:
w = pysal.rook_from_shapefile("../pysal/examples/columbus.shp")
w = pysal.queen_from_shapefile("../pysal/examples/columbus.shp")
Head for the docs for more info.
Here a generic soluion, that you can impĺement with PostGIS or any other OGC-compliant software.
NOTE: as I say before, a key concept in FOSS and GIS is standardization: the best solutions adopt standards, like OGC ones.
Your problem is to "find pseudo nodes"... But I think that it is a little more, "find non-pseudo nodes and join lines of pseudo nodes". ...
I just had a similar problem, and the solution is the following:
You have many queries, so the first question is which one of them fails. I'd suggest bisecting the entire SQL query to find where the problem happens exactly. Comment one half of the query (but make it still work) and see if the problem is still there, if so, bisect this half, if not, the ...
Here's an attempt with postgis. i've used data imported from natural earth data, admin level 1, 1:10m scale.
This will take a long time as it's a 4-way cartesian join with st_relate().
The magic number "FF2F11212" should match when two polygons' intersections are a line, but not when they join at a point. This uses something called DE-9IM. I use a ...
Use the return value of the Intersect method instead of the TopologicalOperator. Try the following instead (I use C#, not VB.NET, so hopefully this works. The casting business is really confusing):
Dim topoOp As ITopologicalOperator = TryCast(pTestPoly2, ITopologicalOperator)
Dim pOutPointCol As IPointCollection = TryCast(topoOp.Intersect(TryCast(pTestPoly1,...
Routing is a graph problem, not a pure geometry problem per se (I am using a bit loose terms here for the sake of clarity). What that means is that you have to grab the original geometries from your features - potentially from various different spatial tables (aka Feature Classes in ESRI speak) and build a graph representation (aka Network Topology ) that is ...
My understanding of the problem is as follows:
If a polyline endpoint intersects a polygon then the polyline needs to be connected (by adding or adjusting vertices) to all additional polyline endpoints that intersect the same polygon.
Some polyline endpoints don't intersect a polygon, being undershoots, but these should be connected as above.
This answer ...
This can be seen as a preliminary to @Underdark's answer whereby you can clean the topology of the vector layer before generalizing. GRASS has a v.clean function which contains a number of tools to repair the layer such as:
snap which 'snaps' lines to the nearest vertex
rmdangle which removes any annoying dangles
rmdupl which removes duplicated geometry ...
Yes, you can write back to the same source file geodatabase and you can even write back to the same featureclass. In the workspace below, I read in the featureclass EsriCitiesDetailed as the Clipee, then write out the clipped features right back to a featureclass with the same name in the same geodatabase.
The key is to drop the target table before you ...
There is a discussion about this on r-sig-geo. For a definitive answer you should ask there, cause there are peoples which know the insights of spatial R.
But, you can also do this in GIS desktop applications (export the shape using writeOGR command from rgdal or writePolyShape() from maptools) like QuantumGIS, GRASS or SAGA.
For QuantumGIS use Vector / ...