New answers tagged

4

At the scale of your display, these lines appear to be coincident, but in reality they're not: I've exaggerated the difference between the two lines using the "Magnify Topology" tool in JTS TestBuilder, which I highly recommend for looking into cases like this. Depending on the goal of your analysis, it might be suitable to snap your vertices to a grid ...


1

I believe the red layer is what you're after, yes? I used the "Polygon intersection" tool from the processing toolbox (under Geoalgorithms, Vector, Polygons)


1

This is Linear Referencing task, however Python makes it much easier. Solution below assumes your points and line are in projected coordinate system. Add your line to mxd, call layer "line". Add numeric field to your points table, use advanced mode in field calculator, python and this expression to polulate it: def Chainage(shp): mxd = ...


0

In PostGIS 2.2 with SFCGAL, this can be done with ST_StraightSkeleton or ST_ApproximateMedialAxis, depending on your criteria.


3

The tool does not carry over source point layer field/attributes. You will have to apply other tools/methods (e.g. spatial join) to bring over those attributes.


0

I found the answer somewhere on this forum. Go to control panel - programs (uninstall) and click on ArcMap, then Repair. After repair, everything will work. I think my CC Cleaner changed something in the registry.


10

You haven't selected the feature, you used the Identify tool. The Select tool icon 2 over to the right in your toolbars


1

I just solved this problem. What you need to do is the following: In Windows go to: Control Panel -> Programs -> Uninstall a program. Then right click on "ArcGIS for Desktop" -> Select "Uninstall/change". The ArcGIS Setup dialog will pop up. Chose the "Repair" option. After finishing the Repair procedures the ArcGIS will be working properly!


4

I would create a middle point layer for snap purpose. Using this nice script of Paul Ramsey and updating for your use case: CREATE TABLE polygons ( gid integer primary key, geom geometry(Polygon, 4326) ); INSERT INTO polygons VALUES (1, 'SRID=4326;POLYGON((0 0,1 0,1 1,0 1,0 0))'); INSERT INTO polygons VALUES (2, 'SRID=4326;POLYGON((10 10,11 10,11 ...


0

Note that since version 2.2.1 SAGA supports toolboxes which can be run from arcgis: https://sourceforge.net/p/saga-gis/news/2015/09/saga-221-released/ " To run ArcSAGA tools, you have to navigate to your SAGA installation directory with the ArcCatalog control and open the ArcSAGA Python toolboxes. It should work out of the box without any further ...


0

I think you are a little confused. The Vector > Analysis tools > Points in Polygons tool is not part of the Processing plugin, it is a core tool of QGIS. There are some tools from both the said plugin and core QGIS which are similar. However, you will have to use the Processing plugin version of the tool in the modeler. The QGIS 2.14 Changelog does ...


1

I'd say importing SA functions, setting workspace to fastest media possible using TableToNumpyArray might help as well: from arcpy.sa import * from arcpy import env env.workspace='in_memory' If in_memory doesn't work set it to folder (not FGDB) on fastest disk. This is where ArcGIS stores temp rasters RasterInt=Int(raster) numberOfCells ...


1

I second that NumPy is fast for calculations on rasters (although converting back to a raster file can seemingly take a long time for the few times I've used it). You could also calculate your area using the Raster properties. Something like this without the need of Int_3d: Edited to correct calculation area = (my_raster.width * my_raster.height) * ...


1

The following might be more of a set of a partial suggestions for your situation rather than a direct and complete answer, but have you considered performing the arcpy.Int_3d() , numberOfCells and area work using numpy arrays? I've tested the function below on some small (6k x 2.5k pixels) single-band rasters and I hope it will reduce your running time. I ...


0

Although not a complete answer, I think I have an algorithm that could work. For each point in poly1, if the Point is closer than epsilon to a LineString in poly2 then move the Point onto the LineString. For each pair of Point objects (one from poly1 and one from poly2) if the two are closer than epsilon then move both to the central point between them. ...


3

Just my $0.02, there may be better ways. arcpy.env.overwriteOutput() Handle this yourself, ogr.Driver.DeleteDataSource() and ogr.DataSource.DeleteLayer() can handle this. You can use OGR_TRUNCATE, but this appears to be at the layer level arcpy.MakeFeatureLayer_management() If you have writable ogr.DataSource, then ogr.DataSource.CreateLayer(...) ...


2

I think that the direct equivalencies are impossible unless you have a person who knows ArcPy and GDAL. Moreover the GDAL/OGR Python bindings (osgeo (GDAL/OGR) are not very "Pythonic" and difficult. It exists other easier alternatives ( Fiona, Pyshp (shapefile), GeoPandas,shapely, rasterio, ...). The last module is compared to ArcPy in Comparing Map ...



Top 50 recent answers are included