Hot answers tagged

8

Yesterday I had no time to create it in details... See my solution in 4 steps: CREATE OR REPLACE VIEW bd_segment AS SELECT ST_PointN(geom, generate_series(1, ST_NPoints(geom)-1)) AS sp, ST_PointN(geom, generate_series(2, ST_NPoints(geom) )) AS ep FROM -- extract the individual linestrings (SELECT ...


5

The only geoprocessing tools you need for that is Intersect (Analysis toolbox) and Join Field (Data Management toolbox). Run Intersect on the land use and watershed polygons which will result in the intersection of those two layers (your watershed layer will be clipped to the borders of your land use layer while having all the attributes preserved). Then ...


4

SRIDs are used as a means to distinguish between the many different coordinate systems. Often there are several coordinate systems that will be suitable for the task you are trying to achieve. The first decision you need to make is whether to use a geographic (latitude/longitude) coordinate system or a projected (x/y) coordinate system. If you are working ...


3

ArcGIS Online Network Analysis services are based on road network data (from various vendors such as HERE/TomTom and some others in several countries) and do not include railways. You would need to obtain the data and build your own network dataset.


3

Assuming you have an older version of GDAL/OGR, you can use OGR SQL to cast the geom field to a geometry. For example: ogr2ogr -f "ESRI Shapefile" "sample.shp" "geo.csv" -sql "SELECT *, CAST(geom as geometry) FROM geo" This will create a new shapefile using the WKT data as the geometry. You can use the same query with ogrinfo as well: ogrinfo -ro -sql ...


2

Here's an idea, based on using Feature To Line. With ESRI, the tool is only available at the ArcInfo/Advanced license level, but with QGIS I'm sure you can find an version of it. So you could, as I often do, supplement your ArcView/Basic license workflow with free QGIS tools. Run Feature To Line to convert the lake features to lines (make sure you're ...


2

This is imo a great question. If you would be interested in just finding the intersection between two polygons, you'd use the Intersect GP tool and then adding the area of the resultant features back to the wetlands. But you are interested not in intersection yet essentially in the edge, or a segment which polygons share. There is a very nice GP tool in ...


2

Not really an answer, but important: An SRID like EPSG:4326 or EPSG:3857 is just a reference number to access a commonly used projected coordinate reference system (CRS). A projected CRS consists of a geographic CRS (geodetic datum, ellipsoid/spheroid, prime meridian), a projection method and parameters, linear unit, and (optionally, for the ...


2

Assuming you have multiple independent polygon shapefiles of fires for a specific area, you can use the following workflow: Merge your shapefiles into one Use the Count Overlapping Polygons script tool The resulting polygon shapefile will have a count associated with the shapefile, which you can then use in your symbology.


2

try hex binning. https://github.com/minus34/postgis-scripts/tree/master/hex-grid here is some code for creating hex grids over Australia at varying levels put together by @Minus34. It's very useful for being able to show the large amount of point data into useful and spatially identical areas.


2

Try using the same tool but from the Processing Toolbox: Processing Toolbox > QGIS geoalgorithms > Vector analysis tools > Distance matrix This version includes distances at 0 m. The first image shows the results of the Distance matrix tool from the Processing Toolbox: This second image shows the results of the Distance matrix tool from the toolbar ...


1

When there is a space in the path, it is recommended to use the r"D:\etc" notation, so that the whole path is understood as one single string. See also the help topic Setting paths to data in Python.


1

I found the answer to the original question, and will therefore answer it here, and make a new question. Turns out that the points that are omitted are the ones that match exactly , or that has 0 metres between them. New question will be about how I can make a distance matrix with both the nearest points with distance >1 m and the ones that match ...


1

EDIT: there is actually a simpler answer. Compute the intersection between your two layers (Vector > Geoprocessing tools > Intersect), then use the Group Stats plugin to compute statistics on the constituencies. You can even compute the total area of Natura 2000 sites per constituency. Minor issue: it will only take into account Natura 2000 sites that ...


1

So after Joseph 's very very heplful comment and the link suggested the following is working in my plugin: ## from qgis.analysis import * from PyQt4.QtGui import QFileDialog ## ##path definition: code copied & pasted from _init_(self, iface) method ##from the plugin' s main module & CLASSNAME: the plugin' s classname locale = ...


1

Here is a great video that helped me out for explaining Cost-Path: https://www.youtube.com/watch?v=d0Eywj4pIu8 As mentioned before, this requires a DEM to create a slope raster using Spatial Analyst Tools -> Surface -> Slope. However, for what you are looking for (get a detailed perspective on hiking from point A to point B), you can implement Tobler's ...


1

In your case, the best tool is probably the "Path Distance" Tool, which will take your DEM into account to adjust the speed. There is a long description on this page on the option to set the speed. Note that the relationship between speed and slope depends on your travel type. By bike, you go faster downhill than uphill, so this is more like a linear cost. ...


1

Here is an excellent source of ports related information: http://www.portsdb.com Currently they provide access to the data via REST API, but I think you may ask about the database dump. There is free and paid option. For basic port information free one is good enough to start.


1

Step 3 of your list is definitely wrong in most cases. It spoils your data, because it does not change the coordinates itself, only the CRS. Instead, you have to save the data from the untouched CRS to another filename and CRS. For the Google background of the Openlayers plugin, project CRS and the CRS of the Google layer must be EPSG:3857. Other layers ...


1

This will not solve all your issues, but its a good start. This script in python 2 works with a csv file with three fields: id, latitude, longitude. You can also add time field and implement the codes for calculate the average speed. It calculates absolute distance walked(diference between last and first point), also calculates the sum of distance to all ...



Only top voted, non community-wiki answers of a minimum length are eligible