Tag Info

Hot answers tagged

7

If you change your program to read the file name from the command line and split up your input file in smaller chunks, you can do something like this using GNU Parallel: parallel my_processing.py {} /path/to/polygon_file.shp ::: input_files*.shp This will run 1 job per core. All new computers have multiple cores, but most programs are serial in nature ...


4

It is very difficult to know exactly where things went wrong without knowing details about the inputs that you used for each tool. However looking at the two images that you embedded into your post, it looks to me like the common problem of running a flow path analysis on a non-hydrologically preprocessed DEM, i.e. a DEM for which you have removed all of the ...


4

I've always been fond of a colour ramp that I use for visualizing flow accumulation (not that unlike your application) that transitions from black to blue to yellow to pale yellow. It does an excellent job of highlighting the high-value areas, gives good contrast within areas of low values and seems to be a bit warmer and less 'ghostly' than the ...


4

I found a way using purely Python to get the coordinates for tweets using a word filter. It doesn't seem like many people include location with their tweets. This might not be what you're after either because this is live streaming data. You can test it by putting a unique filter word and then tweeting that word from your Twitter account. You will see your ...


4

You can create a shapefile layer with your generic list of attribute fields and simply duplicate this layer within QGIS and Save as... another shapefile (or copy/paste the physical files such as .shp, .dbf etc). Then also save a generic style file and use these when dealing with clients. So basically, you have a shapefile "template" to work with.


4

You can take the layer you created for the first client, save it as a different-named shapefile, and then delete all the features in it.


4

If you are open to using alternative software to solve your problem, then I can suggest the Remove Off-Terrain Objects tool of the cross-platform open-source GIS Whitebox Geospatial Analysis Tools (of which I am lead developer). I realize that you said in your question that you could not convert your data to LAS format, but the tool takes a raster, not LAS ...


3

Go to settings, options. From here the Applications section has a Font option, unselect default and edit what font you desire. I'm in 2.4, for reference.


3

I'm guessing you never worked with SAR data before, so I'll break your question down into parts I can answer: 1) Create high resolution DEMs in GIS The process of creating a DEM just from SAR data is quite complex and requires a lot of processing power and memory. I don't know of a GIS software that implements DEM creation due to these constraints. 2) ...


3

I had your same problem. I solved it updating the code in order to match the QGis 2 major changes: int main(int argc, char *argv[]) { QgsApplication app(argc, argv, true); QString myPluginsDir = "/usr/lib64/qgis"; QString myLayerPath = "pathtoashapefile"; QString myLayerBaseName = "italy"; QString myProviderName = "ogr"; // ...


3

You can do it with ogr2ogr at the command line too by using the -where flag. ogr2ogr -f "ESRI Shapefile" -where "FID < 0" output_template.shp input.shp What this does is execute a SQL where query and selects those features with a FID less than 0. None should exist because FID's usually don't have a negative or below zero value, so no new features are ...


3

If I understand you correctly, your polygons will be colored based on multiple data columns. There are two ways to do this: Create a new data column and use the field calculator to classify your polygons based your data Use rule based styling (preferably!). This is a complex topic, but this excellent blog post will get you started, and there is additional ...


3

I would have to say that without the original LAS point cloud, you will only be incorporating more inaccuracies into the data through raster manipulation. The DEM provided looks relatively clean for a heavily urbanized 1m resolution DEM. The "uplifted squares" are a result of triangulations across data voids, where the buildings are not included in the ...


3

Using the direct way as you tried in your example looks much cleaner, however, I did not find out either how to achieve this in QGIS 2.4. So long, as a workaround, you can navigate through the menu interface manually to open the desired map from the OpenLayers plugin. In the following code, set the variables mapProvider and openLayersMap to your desired ...


3

Pieside's answer gives you the straightforward way of doing it. An alternative you may wish to consider is to use the 'Statistics by categories' tool in the Processing toolbox (just open the Processing toolbox and type statistics in the search bar and you'll find it. This tool creates a table of basic statistics (min. mean, max, stdev, count) in one field ...


2

No there is no .NET libraries for QGIS. The only options there are Python and C++.


2

That would be an awesome feature! Unfortunately I don't think it's possible. Your best bet is to probably use the v.clean tool from GRASS to automate the fixing of errors. There's a number of cleaning functions available within the v.clean tool such as: Break: Breaks lines at each intersection snap: Snaps lines to vertex in threshold rmdangle: Removes ...


2

The problem is not in the code, but on the image itself. The Geotiff has 3 bands, and the nodata value is set to 0 Band 1 Block=508x8 Type=Byte, ColorInterp=Red NoData Value=0Band 2 Block=508x8 Type=Byte, ColorInterp=Green NoData Value=0 Band 3 Block=508x8 Type=Byte, ColorInterp=Blue NoData Value=0 However inspecting the image in QGIS, it ...


2

I'm told that in the upcoming QGIS 2.6 when joining multiple layers via the JOINS option (Layer Properties > Joins), editing the attributes of one layer will immediately update the attributes of the joining layers so basically in real-time. If this is the case then you could create a duplicate of the same layer, save it as another shapefile, edit its ...


2

GDAL does not recognize the file as ERDAS imagine, as promised by the extension .img. But it looks only at the file extension, and does no further investigation on the content of the file. EDIT Comparing with other data from the site, they seem to provide unformatted raw binary. The mask should be 17347 lines by 40031 samples (columns) So I created an ...


2

You can define rule-based symbology, which then allows you to create the rules using the usual QGIS expression builder. In this example, I created just 2 rules, one with one field, the other with two fields. You open the expression builder with .... in the Rule properties window.


2

In the menu, click on Vector->Analysis Tools->Basics statistics. See the end of: http://www.qgistutorials.com/en/docs/calculating_line_lengths.html.


2

That is pretty simple by using custom properties by the setCustomProperty() method. The below example adds a memory layer to the legend and set the "showFeatureCount" property to True (you can run it from pyqgis console): ## create the memory layer and add to the registry myLayer = QgsVectorLayer("Point", "myLayer", "memory") ...


2

QGIS Openlayers is not Google Maps! What you trying to do is also known as geocoding. Can be for instance accomplished with the MMQGIS plugin -> geocode The OSM place search plugin The Geocode plugin and likely many more... Or you could just use google maps and copy/paste the resulting longitude and latitude values into the address-bar in QGIS for a ...


2

I also receive the same when opening .shp files directly and selecting qgis-bin as the program to use. But I always load QGIS via the Desktop icon. I'm not exactly sure why but my guess is that the Desktop icon simultaneously runs the following 2 files in order to load QGIS (this is the Target which you can see in the icon's properties): "C:\Program ...


2

You should import a csv file containing your data together with a csvt file containing the type of your data. For each column of your csv the corrensponfing column of the csvt should contain the type, such as "Real","Integer", "String". You can also specify width and precision of your data includinf the following info: "Real(2.12)","Integer(3)","String(10)". ...


1

In input form, you have to specify which column is X and which is Y. You should also check which CRS gets assigned to the layer (if you are not asked). EPSG:4326 WGS84 can only have lat/lon degrees up to +/- 180/90, so cioordinates in metres will exceed the limit in most cases.


1

You have to create a new shapefile of type polygon. The points layer can only contain points. If you set snapping on the point layer, the vertices of the polygon will exactly hit your points.


1

In QGis, use the "convex hull" tool from the vector submenu. From the points shown this creates the following polygons:


1

If you go into layer properties, then go to the "Fields" section, then click on the "Edit Widget" option, You get a checkable option to make the form field editable. Uncheck that box and that should be it.



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