Hot answers tagged

6

The following script saves an image for each earthquake point in a single plot. from shapely.geometry import Point from geopandas import GeoDataFrame import geopandas as gpd import pandas as pd import matplotlib.pyplot as plt import os os.chdir(r'path') def plotPoint(): df = pd.read_csv('earthquakes.csv') basemap = gpd.read_file('basemap.shp') ...


4

The plot() method creates a matplotlib figure and returns an ax object by default. If you want to create just one figure and plot multiple geometries on it, you have to specify the ax parameter. For example: ax = map.plot(cmap = 'jet', column = 'NAME_1', figsize=(10,10)) # keep ax object in a variable pt.plot(ax=ax) # specify ax argument Make sure, of ...


3

It seems like you will get the columns present in your first feature when exporting, unless you specify selectors. In your case, the first feature only contains system:index, time and .geo, so that's what you get in your CSV. The below code snippet find out which Name properties you've got and include them as selectors. It will take a few seconds until this ...


2

The path you're building up is probably NOT correct per: data_dir = r"C:\Users\Stephanie\NOTEBOOKS\FINAL\FSI" item = gis.content.add({}, data_dir + csv) I'd expect this to create a path like: C:\Users\Stephanie\NOTEBOOKS\FINAL\FSImycsv.csv (note the lack of \ separator between path and file name) I'd suggest doing your path like: item = gis.content.add({},...


2

After obtaining a dataset containing the boundarys of all countries (naturalearthdata.com is a good point to start, alternatively get the boundarys from Openstreetmap via the QuickOSM Plugin) you need to join your CSV to your country-data. In QGIS, right click on your dataset (countries) -> properties -> Joins. Here you can select the layer which contains ...


2

You will have to choose an elevation image (e.g. the SRTM), and apply reduceRegions with the vectors as input feature collection. var SRTM = ee.Image("USGS/SRTMGL1_003"); // exampleelevation image // add min, max and mean elevation of each geometry var reducers = ee.Reducer.min() .combine(ee.Reducer.max(), '', true) .combine(...


1

You don't need the csf file if you know your projection. You can set the CRS using the appropriated command txt2las file.csv -o file.las -epsg 32754 The following is also valid txt2las file.csv -o file.las -utm 17T Check out the documentation of txt2las and las2las


1

To solve this issue, I went to the advanced options and specified the lon and lat columns manually.


1

Your region POI is a single point. So you will never have more than a single pixel when you reduce that region. The mean() and sum() of a single pixel is the same, which is why the two charts are identical. Try with something like this: var days = ee.Date(end).difference(ee.Date(start), 'days') var dayOffsets = ee.List.sequence(1, days) var accumulation = ...


1

The (invisible) return value of map is a list with x, y, range, and names components (See Value section in the manual page, i.e. ?map): dat <- map(database="world",regions = "germany", plot = FALSE) str(dat) # List of 4 # $ x : num [1:596] 14.2 14.2 14 13.9 13.9 ... # $ y : num [1:596] 53.9 53.9 53.9 53.9 53.9 ... # $ range: num [1:4] 5.86 15.02 ...


1

This should do the trick. It uses a pandas dataframe with the newer da.SearchCursor. import arcpy import pandas as pd df = pd.read_csv(r"path", usecols = ["GISID"]) fc = r".shp" fields = ['GISID'] gis_poles_assets =[] with arcpy.da.SearchCursor(fc, fields) as cursor: for row in cursor: gis_poles_assets.append(row[0]) for index, row in df....


1

You are using the old cursor which is much slower than the data access cursor. Create a view of the csv and use cursors on both shape and view to list all values then compare using sets: import arcpy fc = r'C:\GIS\ArcMap_default_folder\Default.gdb\ak_riks' fcfield = 'polenr' poles_in_fc = [f[0] for f in arcpy.da.SearchCursor(fc, fcfield)] csv = r'C:\GIS\...


1

Could you consider trying out the Spreadsheet Layers plugin and see if it plays ball with a de-formatted version of your XLSM? (So instead of having it save to a CSV try a simple XLSX file) I have previously used this with XLSX files where I need to edit data in Excel live while having QGIS open (and seeing the updates live). See below for an example. ...


1

If I understand your question, you cannot perform the join because the format of the CSV file (specified in the csvt) is not taken into account. You should import the CSV with the 'Vector layer' input (as you did). The fields of this file have String type. Now, let's say you want to join the CSV table with a vector layer on a integer field called "...


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