Tag Info

New answers tagged

0

You can have a look at the intersection example of OpenLayers: http://dev.openlayers.org/examples/intersects.html for(var i=0; i<features.length-1; ++i) { feat1 = features[i]; for(var j=i+1; j<features.length; ++j) { feat2 = features[j]; intersects12 = feat1.geometry.intersects(feat2.geometry); if(intersects12) ...


1

Not quite the most elegant solution but here's what I did so far. Load the two geojson files var dataset1 = JSON.parse(fs.readFileSync('./d1.geojson', 'utf8')); var dataset2 = JSON.parse(fs.readFileSync('./d2.geojson', 'utf8')); Get features f1 = dataset1.features f2 = dataset2.features Once the features are loaded, it's time to iterate over them. ...


1

Based on this answer How to identify line intersection in QGIS when I have more than 2 lines? you can use the built in tool Line Intersections. Add both line layers to your canvas then from the vector menu select analysis tools then line intersections. Populate the two line layers and the output and hit ok.. Note this tool will not flag ...


1

CREATE table t_intersect AS SELECT hp.gid, hp.st_address, hp.city, hp.st_num, hp.the_geom FROM public.housepoints as hp WHERE NOT EXISTS( SELECT * From public.parcel as par WHERE ST_Intersects(hp.the_geom,par.the_geom))


0

I linked this up in Twitter and received this response from @pwramsey (https://twitter.com/pwramsey/status/568489615293845504) "2 things: Acquiring ArcGIS-like speed in Postgis; and try exploding your wetlands into multiple singletons, not a few multis"


1

The reason of why it takes so long for the query to run is because you are dealing with too many geometries at the same time. Perhaps you could create spatial indexes for your data, this usually greatly improves the processing times. Here is some PostGIS documentation regarding indexes: http://postgis.net/docs/using_postgis_dbmanagement.html#idp7260032 ...


0

I think that intersection is wrong function for you. Intersection is a new geometry and in your case it is a single point. Test by selecting Sdo_Geom.Sdo_Intersection(B.Geom,R.Geom,.00000000005) into Well Known Text. I guess that it will a a point. BTW point can't have 15 overlapping vertices. Either it is a multipoint with 15 members or 15 distinct but ...


1

You need to clip the vector features using your other layer as the Clip Feature. The output file will be a feature class of the ONS vector map in the shape of your clip feature. The tool should be in Geoprocessing > Clipas a default


0

I ended up being able to do what I wanted by using the Intersect function between the buffer layer and the CT layer, as @Chris W suggested. The first time I tried running it, the output was empty. I was told that there was a similar bug in ArcGIS where you had to re-export your shapefile if it had been created with a buffer/union/intersect/etc. function. To ...


0

This is the method that I eventually used to solve the problem. This works for basic LINESTRINGS AND POLYGONS. MULTILINESTRINGS and MULTIPOLYGONS would require a more complex function. /* Create a temporary table that contains the ID of each line and two geometry columns. The first contains any line portions that are outside of all of the polygons. The ...


2

I assume your road_layer_i (for i in [0-99]) layers are not the same layer, that is, they do not have exactly the same lines. Having said that, I've modified your code snippet a bit, making these changes: Use QgsMapLayerRegistry.instance().mapLayers().values() instead of self.iface.mapCanvas().layers(). This ensures you'll iterate on all layers and not ...


0

What you seek is code for segment-segment intersection. I.e., you have a segment (or ray) from O, and you need to intersect it with every edge of your polygon, and then select the closest. (It is generally best to be mindless about this, and just iterative over all polygon edges, rather than try to eliminate edges that have no chance of intersecting.) You ...


0

Field Calculator solution. See first post on how to use: def getFarPoint(shp,n): p=shp.centroid g=arcpy.PointGeometry(p) l=shp.boundary() points=l.getPart(0) m=len(points); lMax=0.0 for i in range(m): pN=points.getObject(i) d=g.distanceTo(pN) if d>lMax: lMax=d;pBest=pN xC,yC=p.X,p.Y xF=pBest.X;yF=pBest.Y pBest.X=xC+(xC-xF) ...


0

One option would be to use PHP if your Data is stored in a PostGIS-Database. You could register a click-event, post the click-coordinates to your php and use this coordinate to check for ST_Intersects to get back the feature attributes. would this be an option for you?


0

The getFeatureInfo should work, asking for both layers you'll get all the features that intersects the requested pixel. If you receive features from both layers then that's your success condition. It's not perfect because is based on pixel area, not an exact position, but only with WMS that's all you got.


0

Geoprocessing tasks by definition generates a new shapefile or feature class. That's why you always give them a "out" parameter. They run mostly as blackboxes, without letting you to interfere in the middle. As other people suggested in the comments, one of the approaches is to open the feature class that was generated, after your command returns (if async) ...


1

@mashhour-darweish ,Try the below approach.The code is in C# style. It may be similar in Java too. Geoprocessor GP = new Geoprocessor(); GP.OverwriteOutput = true; Intersect IntersectDataset = new Intersect(); IntersectDataset.in_features = "(" + srcShapefilePath+"\\polygon.shp", "polygon.shp" + "; " + srcShapefilePath+"\\lines.shp" + ")"; ...


1

You should find your solution at Here that says The above message shows not only when a feature cannot be digitized because it would be removed because of the "avoid intersection" option.It shows also when digitizing a polygon adjacent to another one that has errors. This message is very misleading in this cases. The user should be warned that the ...



Top 50 recent answers are included