Hot answers tagged

6

After trying it on another Windows machine and playing around with the settings, I found the problem: the color of my polygon was defined as a categorized style with $id as the value to create the classes for differenty symbol colors. I changed this to an attribute value fid: Like this, it works perfectly. On the point layer, the expression still is ...


5

You need to convert your coordinates to a string first: aggregate ( layer:='points', aggregate:='concatenate_unique', expression:=to_string(x($geometry)), concatenator:=',' ) This is because double values cannot be concatenated as a string and therefore returning NULL or Could not calculate aggregate for: $geometry. So it is related to '...


5

All GRASS modules work with maps that have been either imported into the GRASS database, or referred to by the r.external command (saves disk space). For the first option you would do: r.import input=cut_n30e000.tif output=cut_n30e000 For the second option: r.external input=cut_n30e000.tif output=cut_n30e000 You might want to have a look at the following ...


4

You can use fiona.io.ZipMemoryFile and gpd.GeoDataFrame.from_features. Example: import geopandas as gpd import io from fiona.io import ZipMemoryFile # Just to create a BytesIO object for the demo, # similar to your request.FILES['file'].file zipshp = io.BytesIO(open('test.zip', 'rb').read()) with (ZipMemoryFile(zipshp)) as memfile: with memfile.open() ...


4

The error refers that you use ImageCollection although Export.image.toDrive function expects one Image. You must pass an Image to image parameter. If you want to export to drive, you can use image: dataset.toBand() (Documentation), or choose one image using i.e. dataset.first() or dataset.get(x) (x: image index), or use Export.image.toDrive in for loop to ...


4

When using aggregate functions with processing it seems there is a scope problem. For your problem, you should use the aggregate function and refer to the layername of your source point layer. Something like that : if ( "point_id" > aggregate('<layername>','median', "point_id"), $geometry , geom_from_wkt('POINT ...


1

@user2856's answer got me half way to a solution. I would not have known about fiona.io.ZipMemoryFile, and that led me to this answer. Combining the two solutions gave me: with ZipMemoryFile(request.FILES['file'].file) as memfile: with fiona.BytesCollection(memfile._initial_bytes) as f: gdf = gpd.GeoDataFrame.from_features(f, crs='epsg:4326') ...


1

If you check the lines between 61 and 71 of the algorithmExecutor, you can see that there is a condition with the catch_exceptions test. For some reasons, in the runAlgorithm of Processing.py the catch_exceptions is set to False. So the error is never transmitted by the reportError method (line 68) So you could submit an issue to ask if it's normal. To me, ...


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