Questions tagged [jupyter-notebook]
Open-source web application for creating and sharing documents that contain live code, equations, visualizations and explanatory text.
119
questions
1
vote
0
answers
28
views
Using QGIS Notebook Extension Compatibility on Windows
I'm currently working on integrating the qgis-nbextension into my workflow on a Windows system. However, I'm encountering compatibility issues and could use some guidance.
Here's what I've done so far:...
0
votes
1
answer
51
views
Import error with using QGIS Native functions in Jupyter Notebook environment
I want to calculate area of all polygon features using Field Geometry function of QGIS 3.22 version. But somehow it always gives an import QGIS error, but when I tried to do a simple buffer of a ...
3
votes
1
answer
161
views
How to import qgis into a jupyter notebook when using a conda environment?
System: Windows 10
conda version : 23.3.1
I have setup a conda environment with qgis according to this: https://gisunchained.wordpress.com/2019/05/29/using-qgis-from-conda/
However, I used the newest ...
0
votes
0
answers
38
views
GeoJSON file doesn't plot points on MapBox in Jupyter notebook
I am running Jupyter notebook on a Databricks cluster and attempting to render a map. I tried the example from the documentation to test and it doesn't plot the points.
# Load data from sample csv
...
0
votes
0
answers
65
views
Using jupyter_client version with ArcGIS API for Python
I am using ArcGIS API for Python.
When I install Jupyter_client==7.1.0, I get error of arcgis 2.0.1 requires jupyter-client<=6.1.12, but you have jupyter-client 7.1.0 which is incomatible.
When I ...
0
votes
0
answers
19
views
User memory exceeded on code that previously ran uninterrupted
I am creating an NDVI time series with Sentinel 2 imagery for NDVI. I am trying to map the NDVI function and get one image per month representing the max NDVI for that month. This code will run but ...
0
votes
0
answers
137
views
Geopandas read_file loads polygon data as lines
I am loading nfhl fema flood layer to geopandas via jupyter workbook and trying to isolate one state of data.
the code is
import geopandas as gpd
import folium
import pygeos
#load USA boundary data
...
0
votes
0
answers
93
views
LatLngPopup in Gmaps in Jupyter notebook
Does gmaps support the LatLngPopup function in folium where it shows the latitude and longitude by clicking in the map?
I saw this page explaining how to do it in javascript, css and HTML, but is it ...
0
votes
0
answers
32
views
With ArcGIS Solutions, what is the difference between Jupyter Notebooks and the Notebook Server? Several solutions now require Notebook server
Several solutions now require a Notebook Server as Part of your Portal environment. Is it truly a requirement or can Jupyter Notebooks work as well?
0
votes
1
answer
632
views
Calculate area of raster overlap with polygon by raster value, geopandas
I have two inputs, a raster with values ranging between 0-2, and a polygon shapefile.
import geopandas as gpd
import xarray as xr
import rasterio
import rioxarray
from rasterstats import zonal_stats
...
3
votes
1
answer
1k
views
Convert local file (shp/CSV) into Earth Engine (EE) object
I work on Jupyter lab notebook on my local PC.
I want to download images from Google Earth Engine based on a shape I have, which is a GeoPandas.
The GeoPandas dataframe I have is coming from a ...
0
votes
1
answer
275
views
Sample regions with Geemap yield empty FeatureCollection
I have feature collection of 200 points and raster which is a result of sum of three bands of an Image. I want to create a table which will show the points (feature collection) and the value these ...
0
votes
2
answers
98
views
Converting threshold MNDVI from Google Earth Engine to Jupyter Python?
I want to convert the script threshold for MNDVI from Google Earth Engine (JavaScript) to Jupyter (Python).
In this case, we make the threshold to 4 class MNDVI and the result is one layer, like this
...
1
vote
1
answer
60
views
out_field in ArcGIS Python API returning unwanted fields
I am trying to output ONLY the Name Field in sdf using ArcGIS Python API and Notebook like thia
query = layer.query(where="POP2010 > 1000000", out_fields='NAME')
query.sdf
But I am ...
1
vote
1
answer
139
views
RuntimeWarning when I try to plot a raster
I'm using JupyterNotebook to analyze some GIS data. I need to clip a raster and plot the result but I've a strange problem. Folder with data is here; the raster size is 1MB.
I'm be able to plot the ...
0
votes
1
answer
118
views
I am trying to perform a machine learning analyis using the ArcGIS module in Jupyter notebooks but strange error
I was trying to import all modules for ArcGIS to perform a machine learning analysis. However, the code gives me an error at the line from arcgis.learn.
Code:
%matplotlib inline
import pandas as pd
...
0
votes
1
answer
700
views
Spatial Data on Python - "EEException: Can't encode object"
I'm working on estimation chlorophyll-a using a Landsat 8 image on Python. But the result doesn't showing the image. I've tried to changing it but it doesn't work. I don't know how to fix it. This is ...
0
votes
1
answer
506
views
Folium map rendering grey squares on data loaded from geopandas frame
I have a geodata frame loaded in from census data that shows the Dutch population density per 500 by 500 meter square. I am trying to load this data into an interactive map with folium and my geodata ...
1
vote
0
answers
405
views
Download of a file geodatabase failing when using script and query
I'm trying to download a file geodatabase using a script. The script is taken from the Esri documentation with minimal changes, basically I'm querying for the required feature layer appending date and ...
0
votes
1
answer
2k
views
Folium and heatmap is not opening in pycharm
I'm using PyCharm version 3.7.
When I tried to open simple folium map I'm not getting any output.
I tried something like this
import folium
import pandas as pd
import csv
dataframe=pd.read_csv("...
2
votes
1
answer
377
views
Putting shapefile on map in ArcGIS Online using ArcGIS Python API and Jupyter Notebook
I inserted a shapefile (in .zip as required) to ArcGIS Online through Jupyter notebook:
from arcgis.gis import GIS
my_gis = GIS()
m = my_gis.map()
#let's put the shape file to AGOL
shp_item = my_gis....
1
vote
1
answer
1k
views
Google Earth Engine Python Folium Map Inspector
I'm calculating the Enhanced Vegetation Index (EVI) of Sentinel-2 data on Google Earth Engine's Python API, specifically in a Jupyter Notebook. I'd like to check that the calculations are producing ...
3
votes
1
answer
679
views
Google Earth Engine Python expression syntax
I'm writing out a way to calculate the Enhanced Vegetation Index (EVI) of Sentinel-2 images in the Python API of Google Earth Engine, specifically in Jupyter Notebook. I have the same code written for ...
0
votes
1
answer
216
views
gdal_pansharpen.py raise module errors
I want to use gdal pansharpen python function. I have two tif files, one is the panachromatic raster and on is the 4 bands raster. I'm using gdal version 3.4.0.
I have tried to use it, based on this ...
2
votes
0
answers
1k
views
Show marker moving live along an ipyleaflet map?
I'm trying to simulate the real-time movement of a vehicle along a pre-determined path (as a list of coordinates) on ipyleaflet (running on a Jupyter Notebook). What I've tried is to instantiate a ...
-1
votes
1
answer
365
views
Importing libraries in JupyterNotebook
import solaris as sol
from solaris.data import data_dir
import os
import json
I already installed solaris:
git clone https://github.com/cosmiq/solaris.git
cd solaris
git checkout [branch_name]
conda ...
0
votes
1
answer
981
views
Use arcpy.FeatureClassToFeatureClass_conversion() on a list
This works on a single feature class:
import arcpy
from arcpy import env
'''
convert feature class to shapefile in Data folder
'''
arcpy.env.workspace = r'\\uncpathto\J\Python\Data'
in_feature = r'\\...
0
votes
0
answers
122
views
Shapefile is not able to clip raster
I am working on using shapefile containing various polygons to clip a raster image. The code works for some raster images, but for some raster images, blank clipped rasters are generated. Both the ...
0
votes
2
answers
1k
views
Problem with gdal.WarpOptions concerning reference
I have a tiff file that I want to crop down to a shp cutline and reproject.
If the code is:
clip_spec=gdal.WarpOptions(format='GTiff',cutlineDSName=os.getcwd()+'/moksha/DEM/cutline2.shp',cropToCutline=...
2
votes
0
answers
707
views
geemap: Error displaying widget - model not found
I am using Jupyter Lab to try and get a map to display, but I receive
Error displaying widget: model not found
whenever I try to run this code. It works on the web browser version so I don't know ...
1
vote
2
answers
586
views
Subsetting a large CSV file using coordinates columns
I have an extremely large CSV file (3GB) and want to choose a part of that based on columns(lat,lon) and do analysis on that. I can't load it into a desktop app like ArcGIS and select a region ...
1
vote
1
answer
574
views
Installing and using Orfeo Toolbox (OTB) through Python
Using Python v.3.6.8 through Jupyter notebook (in Windows 10), how can I set and use OTB (v.7.3.0)?
I followed the steps described in the official cookbook and other tutorials, however, the result is:
...
3
votes
1
answer
192
views
Is it possible to change the raster image size on the fly?
I am trying to change the raster image size on the fly. I have 10 band therefore I cannot use OpenCV. gdal.Warp() gives the option to change the size but I have to save it in a folder. Is there ...
1
vote
2
answers
1k
views
Jupyter Notebook fails to launch in ArcGIS Pro 2.8
Since upgrading to ArcGIS Pro 2.8 from 2.6, I am facing an issue with the Jupyter Notebook that fails to load and returns an error:
Failed to Load Notebook
What all I have tried:
Tried opening the ...
1
vote
0
answers
2k
views
Accessing QGIS using Jupyter Notebook
Using Python for QGIS in a Jupyter Notebook, how can I automate the task of
importing a dxf file
getting a data web service as a layer ?
I have tried (https://lerryws.xyz/posts/Install-Jupyter-...
2
votes
0
answers
89
views
Do the MTL.txt and ANG.txt need to be changed after reclassification using QGIS is done on one or two bands?
I had reclassified("Reclassify by table" in QGIS) the SWIR1 band value for a coastal erosion project to differentiate the land and the water better uisng QGIS and then replaced the SWIR1....
2
votes
1
answer
217
views
Unable to load the data product of Open Data Cube dataset image
I'm trying to load data product of the indexed Open Data Cube dataset image through the Jupyter Notebook. In this I'm using Resourcesat-2 AWiFS Data. The method used is shown below:
import matplotlib....
6
votes
1
answer
2k
views
Raster data viewshed analysis with Python
I want to write an algorithm that performs viewshed analysis in Python programming language using digital elevation model. I generated points from pixels from the raster data in QGIS. I calculated the ...
0
votes
0
answers
835
views
Calculating area or counting number of pixels by category using Python
I am trying to count the number of pixels and calculate the area of each category in 5 images. The categories are 1,2,or 3 in three of the images and UP and P in two of the images.
How do you ...
0
votes
1
answer
107
views
Dataset documentation generation script for Landsat 8 collection 2 level 2 surface reflectance in ODC git repo fails to run [closed]
On running the script in the link below to generate the dataset documentation for data downloaded from USGS Landsat 8 Collection 2 Level 2, it ends in an error.
ls_usgs_sr_l2.py script
The error :
...
0
votes
0
answers
114
views
TopologicalError for Landsat 8 data on Open Data Cube
I've added Landsat 8 collection 2 level-2 dataset to Open Data Cube. While trying to access the dataset through the Jupyter Notebook with the following code,
ds2 = dc.load(product='LC08_L2SP_T1',
...
1
vote
2
answers
214
views
Not able to plot Open Data Cube dataset image
I'm trying to plot the indexed Open Data Cube dataset image through the Jupyter Notebook. I'm using this demo notebook after making a clone of this repository on my local machine.
The plot() method as ...
0
votes
1
answer
1k
views
Google Earth Engine Exporting Image Collection
I am new to Google Earth Engine and satellite imagery in general. My goal is to export bands B1-B7 from the [Landsat 8 image collection][2] over a given geometry and be able to visualize each band (or ...
1
vote
1
answer
212
views
Product information on Open Data Cube is None and NaN
I'm trying to access the Open Data Cube product (indexed Landsat-8) through the Jupyter notebook. Except for the name and description, all other product information such as instrument, format, CRS, ...
1
vote
1
answer
650
views
Accessing Open Data Cube through Jupyter Notebook
I'm trying to access the product added to datacube through Jupyter Notebook. For this, I'm using this demo notebook.
The command import utils.data_cube_utilities.data_access_api as dc_api showing ...
1
vote
0
answers
129
views
Rasterizing vector file in EPSG:4326 using GDAL/OGR in Jupyter notebook
I was trying to rasterize the vector file in Python.
I used this code:
gdal.Grid("trial2.tif", "merged2018-19.gpkg", zfield="h_li", algorithm="nearest")
(the ...
2
votes
1
answer
474
views
Unable to access Open Data Cube database through Jupyter notebook
I am trying to access the product added in Open Data Cube database through Jupyter notebook. I'm using this demo notebook. But I'm not able to connect to the database.
The below line showing the error....
1
vote
0
answers
47
views
Could not make join work in toolbox but works in Jupyter notebook
I am selecting points from the map and roads and trying to join them based on my picks. It works in Jupyter notebook however it does not work in toolbox and I could not figure it out. I tried to ...
1
vote
1
answer
301
views
Google Earth Engine .Map not finding all images in image collection
I have an image collection of 4 images and when I map a function to this it only picks up on two images.
I've created a simple version of the problem to hopefully make this more solvable.
# data to ...
3
votes
1
answer
440
views
Accessing iface in QGIS from Jupyter Notebook?
I am trying to work with an active QGIS from a jupyter notebook - specifically I'd like to be able to access iface so I can perform some layer calculations.
I am having trouble getting the map layers ...