Questions tagged [geocube]

Tool to convert geopandas vector data into rasterized xarray data.

Filter by
Sorted by
Tagged with
0
votes
0answers
19 views

CRSerror in geocube make_geocube

I get the error below when i run the example by snowman2 here Rasterizing polygon grid in Python (geopandas & rasterio) CRSError: CRS is invalid: <Geographic 2D CRS: EPSG:4326> Name: WGS 84 ...
0
votes
1answer
87 views

rioxarray and vector data (including geocube)

I currently got some problem with rioxarray and geocube. I hope, this is the right place to ask. I am using a vector file for the German state of Brandenburg, so it has a massive hole in it. The file ...
0
votes
1answer
67 views

Extraction affine transformation while using rasterio.features.rasterize

I am currently using rasterio.features.rasterize to rasterize my shapefile. But currently I am always using an Rasterfile to a) rasterize and b) save on disk. The get the information of the ...
0
votes
0answers
912 views

Geopandas geodataframe copy with where clause causes geometry issues

Question up front: What is likely happening here, where when I take copy of the dataframe with a where clause present that there is an apparent break in the geometry, as implied by the linestring ...
1
vote
1answer
896 views

Convert GeoDataframe to Raster [closed]

I want to convert a GeoPandas GeoDataframe to raster (.tif). I have multiple attributes in my GeoDataframe and want to create a raster using a single field from the attribute table. The underlying ...
0
votes
2answers
470 views

Extract population count from GeoTIFF based on mask layer

I downloaded Population Count data from Gridded Population of the World (GPW), v4 as a *.GeoTIFF file. In a next step, I would like to extract the population count of a given area based on a mask ...
1
vote
1answer
1k views

Shapely Polygon to numpy boolean mask [closed]

How can I convert my Shapely polygon to a numpy pixel array representing a boolean mask, with True for where the polygon is?
2
votes
1answer
496 views

Rasterising multiple shapefiles into a single raster

I'm not even sure you can do this, but I want to convert multiple shapefiles into a single single-band raster. I'm pretty sure its going to be easier to first create a multi-band raster and then use ...
2
votes
1answer
376 views

What data structure to use for raster data when using rasterio?

I want to write a method in Python that reads a raster (GTiff) using rasterio and returns its contents. Then, some processing is done. Finally, I want to write the data to a new GeoTiff. As far as I ...
0
votes
1answer
450 views

Rasterising shapefile in Python? [closed]

I am trying to rasterize a shapefile with Python using ogr, but if you know to do with other libraries as fiona, I am interested in too. I use the shapefile in the following website: https://www....
4
votes
1answer
4k views

Rasterizing polygon grid in Python (geopandas & rasterio)

I am trying to rasterize a custom polygon grid with one or more columns. Preferably I'd like to create multi-band rasters from multiple GeoDataFrame columns (in polygon grid), but I have got stuck ...
1
vote
2answers
2k views

How to convert vector format (geopackage, shapefile) to raster format (geotiff) using rasterio without template raster

I'm looking to create a raster given just a geopackage (or shapefile, or other vector format). I don't have a template raster, and all I wish to do is burn the shapes into a raster using rasterio. ...
14
votes
2answers
15k views

Rasterize a shapefile with Geopandas or fiona - python

I need to rasterize a really simple shapefile a bit like this http://tinyurl.com/odfbanu. Which is just a shapefile coutaining counties in the US.I have seen this previous answer : GDAL RasterizeLayer ...