Questions tagged [python-3]

Use this tag when Python 3 (or any of its dot releases) is the version you are using.

Filter by
Sorted by
Tagged with
1
vote
1answer
426 views

Open Data Cube how to continue after the creation of the database?

I have some questions about using Open Data Cube. First of all I have successfully installed the virtual environment with miniconda and the database with PostgreSQLPortable-10.1.1. Now I have already ...
1
vote
1answer
34 views

Pyproj inverse transform returns NaN with EPSG that is not 4326

I am using pyproj inverse transform to add azimuth and distance "info" to an ordered geodataframe and keep getting unexpected NaN results when I use a local UTM-based EPSG. It works fine in ...
1
vote
1answer
148 views

Setting selection border color in red and save the map of the resulting selection

I'm attempting to create a plugin in QGIS 3 in order to zoom on a selected feature and get the map picture exported in .jpg format. I've been able to perform the zoom and selection of my selection, ...
0
votes
1answer
23 views

How to extract CRS ellipsiod info in correct format for pyproj inverse

I am using pyproj inverse transform to add azimuth and distance "info" to an ordered geodataframe (gdf), but my datasets are in different locations around the world. I need to use a local ...
1
vote
1answer
31 views

Using pyproj inverse transform to get azimuth, row iteration and lambda apply (I'm close to the answer!)

I am using pyproj inverse transform to add azimuth and distance "info" to an ordered geodataframe. I am trying to iterate over all the rows in the geodataframe to add the "info" as ...
1
vote
0answers
35 views

ArcGIS Pro Python Toolbox - env.workspace being 'forgotten' after using Spatial Analyst tools

EDIT I've narrowed down the cause of the problem to the spatial analyst toolbox. After using an SA tool, arcpy seems to temporarily 'forget' the env.workspace setting: Subsequent attempts to reference ...
0
votes
0answers
25 views

Conversion of (lat, lon, height) to another CRS with pyproj results in no transformation

I have latitude, longitude, and ellipsoidal_height measurements in the IGS14 CRS. I want to convert/transform/project this data into latitude, longitude, and ellipsoidal_height measurements in the ...
2
votes
1answer
52 views

How can I launch a QWidget after pressing a submenu (QAction) in QGis3.4?

I need your help I am developing a dialog box (which I will call toolraster) in QGis to interact with raster layers. I want it to display when I click on a menu I insert in the QGis interface. I ...
0
votes
1answer
116 views

GDAL & Python 3 environment variable

Newbie here. I've just loaded OSX Catalina on my iMac. I've installed GDAL 2.4 complete from the Kyngchaos site. The install works great for all GDAL commands except for the python ones (...
2
votes
0answers
24 views

Stand-alone PyQGIS (QGIS 3.13) scripts with OSGeo4W and the Orfeo toolbox (OTB 7.1.0) seem to be mutually exclusive

I am changing my python environment from working with ArcGis and Arcpy to working with QGIS and PyQgis. And I also want to use the machinelearning possibilities from the orfeo toolbox. In doing so I ...
1
vote
1answer
917 views

Enabling Jupyter nbextension for ipyleaflet?

I was trying to test out this script https://github.com/tylere/PyDataNYC2017/blob/master/ipynb/satellite_analysis.ipynb but got stuck at the iteractive mapping part. import ipyleaflet map1 = ...
2
votes
1answer
151 views

Running python code created in QGIS

I'm using QGIS 3.4 and Python 3.7.0 on Windows 7. From the Python console of QGIS, I created a test script ("test.py") which contains the following line: print('Hello) and this is saved in C:\...
2
votes
1answer
44 views

Check if polygons of a GeoJSON file are included in polygons of another

I have two GeoJSON files. A province.geojson file and a constituencies.geojson file and I would like to know for each district polygon which province it belongs to. That is to say, for each polygon in ...
2
votes
1answer
518 views

Setting reference frame for shapefile with pyshp?

I'm using pyshp to create new shapefiles with Python 3. My code runs without errors, but when I open the resulting file in ArcMap I get this error: The following datasource you added is missing ...
2
votes
1answer
81 views

ArcPy UpdateCursor: How to find specific row index of dictionary key/value difference?

I have a Python script that hits a REST API and grabs attribute data for rooms in buildings from an IBM Tririga DB. I have an Enterprise geodatabase rooms feature class populated with these same ...
1
vote
1answer
91 views

Can one use ArcPy with Python 3.7 instead of default Python 2.7 that comes with ArcMap 10.6.1?

I want to use arcpy with Python 3.7. I tried setting the paths to arcpy but Python 3.7 doesn't import arcpy properly. Is it possible to use a Python version outside of default version that ships with ...
2
votes
2answers
4k views

geopandas can't import

I've installed geopandas on ubuntu 17.10 and can't import geopandas. I can't find this particular error anywhere. from pyproj import _proj ImportError: cannot import name '_proj' I'm using a virtual ...
3
votes
2answers
474 views

PyQGIS standalone script using QGIS 3.2

I want to work with PyQGIS Python 3 using QGIS 3.2 standalone install. I created a simple batch file to work with PyQGIS but I have some errors. Here's the batch file: @echo off SET OSGEO4W_ROOT=C:\...
0
votes
0answers
9 views

Programmatically remove default shortcut of Locator

Using Python, how may I go about changing or removing the default shortcut of the Locator? I have a list of desired_shortcuts that I leverage as a comparison point against QGIS defaults to remove ...
4
votes
1answer
195 views

Differences between OSGEO GDAL and GDAL python bindings?

Question I'm trying to figure what are the differences, and of course, what is the best solution to use, between two python3 bindings: GDAL, imported as import gdal OSGEO.GDAL, imported as ...
0
votes
0answers
19 views

AttributeError: module 'gdal2tiles' has no attribute 'generate_tiles'

I'm trying to use gdal2tiles inside a python script and I'm following this example. Then I've writed my custom script and I've started my custom conda environment: options = { 'zoom': (12, 22), ...
1
vote
0answers
9 views

Problem in distributing GDAL in stand alone application

I'm desperate with the distributing problem of gis packages each time. It is the third day that I'm desperately trying to make an .exe using Pyinstaller to a small application I developed using GDAL ...
0
votes
1answer
284 views

Debugging Error: Algorithm gdal:dissolve not found in PyQGIS?

I have difficulties with the processing package. I try to run a simple QGIS dissolve in pyQGIS 3. When I run the line : from qgis.core import QgsVectorLayer import processing from processing.core....
2
votes
0answers
104 views

Identify partial intersections between a polygon layer and a line layer using PyQGIS

I have a drains layer (polygon) around which I have created buffers of varying distances. I want to find the intersection between the different buffer layers and pipes (line) layer and accordingly ...
1
vote
3answers
5k views

Ipyleaflet map object doesn't display in Jupyter Notebook but it gets created

When running the code from the example (https://ipyleaflet.readthedocs.io/en/latest/api_reference/map.html#example), no map get displayed. from ipyleaflet import Map, basemaps, basemap_to_tiles m = ...
0
votes
1answer
88 views

ArcGIS Pro - Python Runtime Error at command prompt

I have been following the example of 'Update Real-Time Data with Python' on https://learn.arcgis.com/en/projects/update-real-time-data-with-python/ but get a runtime error when I run the example from ...
0
votes
1answer
679 views

Installing Python bindings for 64-bit Python on Windows

I installed GDAL and its Python bindings from GISInternals. While I believe that GDAL was installed correctly, the Python bindings have an issue. After opening a file with gdal.open I cannot read ...
7
votes
3answers
6k views

Installing external python packages for QGIS 3?

While there are tools and methods for qgis 2 i cannot figure out for 3 I want to install external python packages such as sqlalchemy etc I tried the following things : Tried to download osgeo4w ...
0
votes
0answers
8 views

Linear projection going astray

I have developed a tool that tries to find a path connecting a set of telecommunication network equipment along a given road network. Since the equipment is located at various distance from the road ...
1
vote
0answers
42 views

Load layers for viewing in QGIS 3 from delimited text

I am trying to use part of a script to add points from a delimited text file, however, when I use it the layers are not loaded on the screen and not saved in the path indicated as .shp import os ...
0
votes
4answers
968 views

QGIS “python3.exe: No module named gdal_merge”

I just would like to merge several raster of GeoTIFF but after the QGIS update from 3.3 to 3.4, even this simple tool can´t be used for the same raster anymore. GDAL command:python3 -m gdal_merge -...
2
votes
1answer
975 views

Run Python 3 scripts on ArcGIS Server 10.5

Is it possible to run Python 3 scripts on our ArcGIS Server 10.5 running windows? Basically, I have a script that I want to publish as a geoprocessing tool that exports an .aprx (ArcGIS Pro) file to a ...
1
vote
1answer
72 views

Create an ESRI Shapefile from WKT with OGR

I want to create an ESRI Shapefile layer from a CSV file. In my CSV I have several attributes (text, numeric) and geometry in WKT style. I have a problem with the geometry field wich is truncated to a ...
1
vote
0answers
31 views

Exception for error produced while running arcpy.MakeXYEventLayer_management method

I am using Python 3.6.8 to make an XY Event layer. I first use the arcpy.MakeXYEventLayer_management(inputCSV, "Longitude", "Latitude", TempFeatureLayer, WGS84, "") where TempFeatureLayer is defined ...
0
votes
2answers
277 views

Importing ArcPy installed with ArcGIS Pro in PyCharm

I am trying to import arcpy in a script, which is running in a PyCharm environment using the Python 3.6.6 installation that comes bundled with ArcGIS Pro 2.3.2 as the base interpreter. I get the ...
0
votes
1answer
1k views

Smoothing shapefiles using Python

The purple is the original polygon to be smoothed and I would like to smooth the polygons as the red line using Python. I tried simplify but looks like I need a buffer and simplify the buffer. But I ...
2
votes
1answer
143 views

Geopandas (points) to Numpy Array

I have a geopackage with a point feature. Which contains points along 19 lines. So, the number of points per line is exactly the same. Therefore, I could see it as a matrix in numpy. Moreover, each ...
1
vote
3answers
3k views

Click event on maps with Folium and information retrieval

I was wondering if there is a way in Folium to get the information on an entity we click on with Folium? I'd like the map to either open a tab with the attribute information or just send back ...
2
votes
1answer
83 views

Python clipping large shapefile by radius [closed]

I cannot find any real answer so I'd like to ask how to crop shapefile with roads in Python. The goal is to leave roads (nodes) in black circle only, then output that to dataframe in geopandas (...
1
vote
1answer
139 views

Transform geospatial data from decimal degrees to x,y coordinates using pyproj in Python

I have the following dataframe latitude longitude xx yy 0 37.75153 -122.39447 553343.041098 4.178420e+06 1 37.75149 -122.39447 553343.069815 4.178415e+06 2 37.75149 -...
3
votes
0answers
166 views

OSError - cannot import geopandas

While trying to import geopandas error occurs: Exception has occurred: OSError Could not find lib geos_c.dll or load any of its variants []. I downloaded GDAL and fiona for Python 3.7 from this ...
0
votes
0answers
41 views

Using qgis.core in anaconda environment

I am trying to use qgis.core in a Conda Environment with qgis, PyQGIS and Python 3.7 installed. I get over an over the next error: File "C:\Users\dg\.conda\envs\env_p3\Library\python\qgis\core\...
2
votes
2answers
6k views

Visualizing GPS points on interactive map [closed]

I am using version 3.0 of python, I want to visualize GPS points in my dataset on interactive map. Is there any python library that can help me to visualize my data on maps. The input dataset in ...
1
vote
0answers
54 views

Merge two maps only at the boundaries with python code

I have two maps one is normal cluster map and other is a grid map. I want that only at the boundaries the cluster map should follow grid map. Refer to the image, map in violet is my cluster map and ...
3
votes
1answer
359 views

Merging a geodataframe and pandas dataframe based on a column

I have a simple geopandas dataframe that includes geometry and a column called 'MUKEY': merged_spatial_df.head() I want to merge it to a tabular (.csv) pandas dataframe (which also has a column ...
0
votes
1answer
71 views

How to read ALOS PALSAR data using gdal

I have downloaded ALOS-1 PALSAR level 1.0 data from data archive from Alaska Satellite Facility. After unzipping files ,I am getting image files,Leader Files,Trailer File and Volume File. All the ...
8
votes
3answers
8k views

Where can I find GDAL Python bindings for Python 3.4?

I am using python 3.4 for development and I need GDAL python bindings for python 3.4. I have already gone through this site, but I can only find up to python 3.3?
0
votes
1answer
497 views

Getting “Cannot zoom to selected feature(s) : No extent could be determined” from PyQGIS

I am using QGIS 3.4.4. I am trying to zoom on a specific place of my map using PyQGIS In order to do so I've defined the layer I wanted to get the features : couche_parcelles = QgsProject.instance()...
1
vote
0answers
23 views

Generate tiles when creating tile Layer on ArcGIS Enterprise Portal

I have a raster (TIFF) that I want to publish on my ArcGIS Enterprise Portal. To reach that aim, I followed these steps : 1) Create SDDraft from TIFF in ArcGIS Pro project 2) Create SD file from ...
1
vote
1answer
84 views

Python user defined function written for ArcGIS Pro returns None when it should return an address?

I am rewriting a 2.7 Python script for compatibility with ArcGIS Pro and organizing it with user defined functions so that I can debug portions of the script as I go. I am new to the process, but I ...

1
2 3 4 5