Questions tagged [python]

Python is an open source interpreted programming language used in many GIS programs.

Filter by
Sorted by
Tagged with
8
votes
1answer
107 views

Coarse Woody Debris extraction

I created very high dense point cloud of some forest plots using terrestrial laser scanner. Then removed points above 1.3 meter to see the coarse woody debris (Fallen dead trees). Attached is the ...
0
votes
1answer
52 views

Compiling PDAL with both Python2 and Python3 bindings support

I would like to build PDAL with both together support for Python2 and Python3 bindings (on Ubuntu 16.04). Fig. 1: Screenshot of the Python stuff within cmake-gui. How could I achieve this? If a ...
1
vote
0answers
15 views

Finding the area where there are most polygons that intersect?

I am in the midst of an important research discovery. I have a shapely.geometry.multipolygon.Multipolygon object, and my question is two-fold. The first, how do I find cluttered areas in the ...
1
vote
1answer
13 views

Create Query either using Select by Attributes or Python

I am working on something for my job, where I have a list of water/sewer service customers. Some customers have one service or the other, while others have both which is stored as two separate entries....
1
vote
1answer
76 views

Length of intersections from a linestring and a grid shapefile by using Python geopandas & QGIS

I am using Python geopandas and I have two shapefiles. One of them is a grid file containing equal polygons. The other shapefile is a linestring file with several lines and its Attributes. The idea ...
0
votes
2answers
96 views

Integrate JSON file inputs (specifically latlng) in Leaflet with JS

It's my first time using Leaflet and I wanted to simply put two markers based from my inputs. I managed to connect my JSON file with the JavaScript and the only problem I have is how to dynamically ...
0
votes
0answers
13 views

Reading LAZ file in Python directly?

I am able to read .las file in Python using laspy as below: las_filename = 'abc.las' inFile = laspy.file.File(las_filename, mode='r') But when I put a .laz file in this code, I get the below error: ...
1
vote
0answers
78 views

Resolving CRS Error in rasterio

I am trying to use the pysheds package to calculate flow accumulation from a DEM. However, when reading the DEM .tif-file, I get the following error. I can't find any more information as to what this ...
0
votes
0answers
16 views

Tools for programmatically finding a large flat site using height map data

I want to find the best location for a large science experiment. It requires two long (multi-kilometer), flat "arms" about 20 m wide separated by an angle between 45 and 90 degrees. I want to use ...
1
vote
0answers
128 views

Automate snapping GeoJSON data on OpenStreetMap with their road XML file?

I currently have Route data in GTFS that I converted to GeoJSON format and stored in MongoDB. However, even the GTFS provided have still some shapefiles missing therefore a lot are still hovering over ...
1
vote
1answer
121 views

Circle is ellipse using OpenStreetMap

Currently I have a problem while developing an app - I use OpenStreetMap and draw a Circle and pass it to a Python back-end, as central point and point on the perimeter on the Circle. Next I am ...
1
vote
0answers
288 views

Retrieving OpenStreetMap data (ways and its child nodes) by coordinates using Overpass API?

I am new to using OSM.I am trying to download OSM data programmatically using Python. I need data of ways and its child nodes contained in a perimeter specified by coordinates. Currently, I am ...
0
votes
0answers
13 views

Temporal combination of Raster files?

I have a set of time series raster files, and need to combine them using python. As an example my file's name are A1.tif, A2.tif, A3.tif... I want to combine A1.tif and A2.tif and after combination ...
2
votes
1answer
43 views

Georeferencing a numpy tensor (spatio-temporal data)

I have a CSV file in which each row represents a record of an event with the following columns: latitude, longitude, time I want to build a numpy tensor with n x m x 8760 (hours in a year) ...
8
votes
2answers
2k views

Difference in destination location between pyproj and geopy

I am looking at ways to calculate (in Python) the destination location from a point given bearing and range. Based on the results comparison from the 2 libraries in subject(geopy and pyproj), I ...
1
vote
2answers
75 views

Reading big raster getting warnings using GDAL Python

I am trying to use GDAL Python API to deal with some big raster, and when I read these rasters into Python, I get warnings like that: Warning 1: TIFFFetchNormalTag:ASCII value for tag "GeoASCIIParams"...
0
votes
0answers
6 views

Adding RGB values from a .txt file to a .las file using laspy

I have a text file that has XYZ and RGB values in it. To convert it to .las format i use lfile = laspy.file.File(r"D:\las\tolas.las", mode='w',header=LasHeader(x_scale=0.01,y_scale=0.01,z_scale=0.01))...
3
votes
1answer
44 views

Value NAN in netcdf4 file for lat&lon using python

I have two file netcdf4 ( latlon and other file without latlon) i open the 2 file in the same code and i choose one variable and the two variable lon and lat when i write lon i have the value nan i ...
1
vote
1answer
462 views

PyProj - Transform coordinate in “HK80 grid” to “WGS 84 / UTM zone 49N or 49S”

Am trying to use python pyproj to do the above conversion (convert/transform from Hong Kong GRID to Hong Kong UTM), but am getting different values from the expected result. My expected conversion ...
4
votes
1answer
652 views

Adding python module to QGIS python interpreter on mac?

I'm on OS X El Capitan running QGIS version 2.18.2 which I installed via the Kyngchaos installers. I'm trying to install a plugin, which requires, among other things, that Pysal needs to be installed....
0
votes
1answer
54 views

Text File MultiPolygon/Polygon to PostgreSQL using Python/Psycopg2

I am writing a python script attempting to insert GeoJSON Polygon coordinates into a Postgres table. I am writing a basic insertion code since I am new to GIS domain. The code look like this: ...
2
votes
2answers
38 views

Upscaling Raster Data in Python

Edit Solved Thank you to user2856 for helping me crack this. For anyone looking to solve this in future hopefully this is helpful. import geopandas as gpd import rasterio as rio from rasterio import ...
2
votes
0answers
28 views

“RasterioIOError: This is a BigTIFF file. BigTIFF is not supported by this version of GDAL and libtiff” error message

I am trying to read a raster ".tif" file with rasterio: import rasterio raster_path = r'.........\file.tif' raster = rasterio.open(raster_path) but I am getting the following error message: "...
-2
votes
0answers
14 views

Need python idle with pre-coded toolbox [on hold]

I need python toolbox with pre - installed set of label , buttons, which is similar to visual studio toolbox .Is there any python idle available with set of pre-coded toolbox ?
2
votes
1answer
76 views

How to use a specific transformation for a coordinate projection with Python

I try to use Python to project single coordinates from Gauß-Krueger-coordinate system (EPSG:31467) to ETRS89-UTM (EPSG:25832). I'm using the way Antonio Falciano showed here. So my script looks like ...
1
vote
1answer
209 views

django-raster rendering raster url

i want to add raster functionality in django using postgis database using django-raster package and this docs. here my code : models.py from django.contrib.gis.db import models class RasterWithName(...
1
vote
0answers
29 views

Plotting CDF of the values in a raster (.tif) file, using Python or QGIS?

I have a tiff file with some values and I want to read those values and plot a CDF (Cumulative Distribution Function). So far I only know how to get the mean value from osgeo import gdal gtif = gdal....
3
votes
1answer
31 views

Find duplicate point geometries in a shapefile [on hold]

How to find a duplicate point geometries in point shapefile (around one lakh geometries) using Python OGR/GDAL
2
votes
1answer
41 views

Making polygon shapefile from unsorted point shapefile?

I have a point Shapefile with unsorted feature ID's (FID). I want to convert the same point file into polygon Shapefile by using python gdal/ogr. I got the help from link1 and link2. I'm able to make ...
1
vote
2answers
167 views

Transforming a polygon to a linestring

Is it possible to (trivially, via a tool in python) to convert a polygon to a linestring? if so, how? If not, why?
0
votes
2answers
43 views

arcpy Polyline.within(Polygon) return False for all lines between pairs of Polygon vertices

I'm trying to develop a function which will find the longest straight line length that can be drawn within any of the polygons in a feature class. (To keep things simple, I'm only including lines ...
0
votes
0answers
7 views

Route Planning Tool for Runners When Given Start Point, End Point, and Distance [on hold]

My orgnization has ArcGIS Enterprise 10.6.1. I also have ArcGIS Pro 2.4.1 and ArcMap 10.5.1. I also have most extentions available such as Network Analyst and Spatial Analyst. I would like to ...
3
votes
3answers
2k views

Couldn't load SIP Module

After reinstalling QGIS, the desktop program runs but generates the python error "Couldn't load SIP Module Pythin support will be disabled" Because of this error, no plug-ins will load. I found a ...
0
votes
1answer
136 views

ValueError using MapProxy decorate image middleware with WMS

I am successfully using Mapproxys decorate image middleware to apply a watermark to WMTS tiles. I am using the following code: def annotate_img(image, service, layers, environ, query_extent, **kw): ...
1
vote
1answer
39 views

Planet not able to get a response from quick-search API call

My question is related to: Planet API not being accepted for quick search but is on stats and planet quick-search api not recognizing authentication?. I am not able to successfully get a response ...
2
votes
1answer
22 views

'Must have equal len keys and value when setting with an iterable' error message

I have a postgres spatial table that I want to convert to a geopandas GeoDataFrame. In order to do so I wrote the following piece of code: #'pg_tab_clip' is the name of the postgres spatial table #'b'...
1
vote
1answer
25 views

Make imagecollection from list of images through a for loop in Earth Engine Python API

I try to code Mosaicking a Image Collection by Date (day) in Google Earth Engine this issue with Python. #Load Sentinel 1 and filter data def load_dataset(ImageCollection_ID,begin,end,aoi): ic = ...
1
vote
1answer
40 views

Cutting a portion of a satellite image based on coordinates in GDAL?

I have a satellite image of 7-channels (Basically I have seven .tif files, one for each band). And I have a .csv file with coordinates of points-of-interest that are in the region shot by the ...
0
votes
0answers
14 views

Making map with country names using Cartopy? [on hold]

I'm trying to print a map of Europe with the names of the countries, but I can't find how anywhere. It would also be nice if I could edit the country names.
1
vote
0answers
29 views

Multiprocess Spatial Join with Spatial Index

I'm a newbie in implementing GIS on Python, but the lack of any GIS software at the office has forced me to learn about it. I have a huge grid (a multipolygon) that I'm currently filling out with ...
0
votes
0answers
12 views

Missing area when using tabulate area in ArcPy?

I create a polygon layer including 80 buffer areas (they are not overlapping) and want to get the area of each value of a raster file for each buffer area. I can use the tabulate area to realize this ...
1
vote
2answers
129 views

Python: ogr2osm create osm file from WFS

Does anyone know if ogr2osm can use WFS Layer as input source to create a osm file i could not find anything in the documentation expect that it should support all ogr file formats. If so how can I ...
0
votes
1answer
39 views

Can't open QGIS 3.8 plugin manager on OSX

I have not been able to open the plugin manager in QGIS 3.8. I am running Sierra OSX. This is the message that I get when I try to open the plugin manager: An error occurred during execution of ...
3
votes
1answer
207 views

Identify Locations within a Polygon

I have a series of locations stored within a Vector layer and want to write a query to understand which of these locations fall within the polygons from another layer using the QGIS Python console. ...
0
votes
0answers
15 views

NotImplementedError: Wrong number or type of arguments for overloaded function 'CoordinateTransformation_TransformPoint'

Hello I am new to working with GeoTiff data and I am trying to grab lat/lon values from a tiff image. Here is my code: import gdal import matplotlib.pyplot as plt import osr # open the dataset and ...
18
votes
4answers
12k views

Is there a Python Lib for requesting WMS/WFS and saving as image/PDF?

i am wondering whether there's Python open-source GIS lib which has APIs to support call WMS/WFS from another GIS server (e.g., GeoServer) and then save the response data(WMS Basemap and WFS layer) as ...
2
votes
1answer
223 views

Error reading envi file from zip using /vsizip and gdal in python

I am having an issue reading an envi binary file (with .hdr file) from a zip file using gdal in python and the /vsizip driver. I know the envi file (binary and header) itself is fine, since when I ...
1
vote
1answer
251 views

Invalid geometry constructed by EE Python API

I have a problem with Python API of Google Earth Engine. I'm trying to create a vector mask of a small area based on NDVI. I take Sentinel-2 data as two bands and pass a rectangle (defined as series ...
3
votes
1answer
807 views

Altering legend labels in Matplotlib

I have a choropleth map which displays crime percentage change. It is plotted from a geodataframe and the choropleth intervals are determined in the background by Python. Unfortunately, the first ...
1
vote
1answer
88 views

Checking if two layers of features exists on same location using QGIS Python?

I have two layers named Layer1 and Layer2 containing some features. Layer2 features are overlapped on Layer1 features. Using python I want to check if a feature exists on layer2 when i select a ...