Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Hot answers tagged

3

Creating a point with 2 coordinates actually creates a 3D point as can be tested with point=ogr.Geometry(ogr.wkbPoint) point.AddPoint(float(1.0),float(2.0)) print point.ExportToWkt() POINT (1 2 0) You can turn 3D points into 2D points with FlattenTo2D point.FlattenTo2D() print point.ExportToWkt() POINT (1 2)


2

ESA's SNAP software does have a Python API which you can set up by following these instructions. Additionally, in your SNAP bin directory you'll find the Graph Processing Tool executable. This provides a command line interface to the operators available in the SNAP GUI. Further, you can create your own graphs depending on your workflow and specify your ...


2

Check out PySAL: The Python Spatial Analysis Library https://pysal.readthedocs.io/en/latest/


2

If you need modify the "Feature" Blending Mode on "Darken" use this: layer.setFeatureBlendMode(QPainter.CompositionMode_Darken)


1

gdal supports the GRIB format. You can use it to open your file and read a specific band as a numpy array. Then, assuming both your grib file and the x y coordinates share the same spatial reference and that your raster is not skewed, you can calculate the row and column (indices) of the array the coordinates correspond to. To do this you need to know the ...


1

If you modify your code to create a list of True/False instead of geometries/None you should be able to use loc and the list as mask: Access a group of rows and columns by label(s) or a boolean array. point_nodes = [True if x is not None else False for x in point_nodes] newships = ships.loc[point_nodes] Which will give you all columns of ships but only ...


1

The error message says that the key 100 is not found in this line uri = TYPE_MAP[layer.wkbType()]. So layer.wkbType() returns 100 which is the code for NoGeometry. So I guess you have a layer with no geometry set. If you can somehow disable or remove that layer it might work. Alternative try to update QGIS2Web. Looking at the source code you can see that an ...


1

Assuming your rasters are integer-type, you can create a ColorTable, specify the color for each value using the SetColorEntry() method and then apply the ColorTable to the raster using the SetRasterColorTable() method to the individual band. The SetColorEntry(pixel_val, (r, g, b)) method takes two arguments, where the first one is the pixel value and the ...


1

I think you are trying to split the polygon with the same polygon. You only use poly.geojson


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