Skip to main content

Questions tagged [data-frame]

A map element that defines display properties for one or more layers in ArcMap.

Filter by
Sorted by
Tagged with
2 votes
1 answer
90 views

Calculating field using expression taken from DataFrame with PyQGIS

The sample data can be downloaded here: https://github.com/jude9apple/sampleData I am using PyQGIS in QGIS 3.36 (in PyCharm) to run a script which reads a table containing which processes apply to ...
Juliette Lapeyre's user avatar
1 vote
1 answer
19 views

How do I join grid cell data set with 2 travel time data sets?

I was doing an exercise from Automating GIS Processes courses and one of the tasks required me to join a YKR grid cell data set with two data sets of travel times to two shopping centres from every ...
mfirdaus_96's user avatar
0 votes
1 answer
75 views

How to change the aspect ratio of data frame in ArcMap

I want to be able to change the aspect ratio of data frame in layout view but it seems that there is no way to untick the related option in Data Frame Properties window!!! I tried to use the ...
Sepideh Abadpour's user avatar
0 votes
1 answer
108 views

Delete MS Word-Object in Dataview with ArcPy (ArcMap)

My mxd has a dataframe which contains a MS Word-Object ("Insert" - "Object"). The Object was added to data view. I want to access the MXD dataframe in PyScripter using arcpy....
Philip Srnck's user avatar
0 votes
1 answer
45 views

Create a new GPFeatureLayer from data frame

I am a complete newbie to ArcGIS/ArcPy. I am creating a new Python Toolbox, that reads in a GPFeatureLayer, and also should return one. I read in the values of a GPFeatureLayer row by row. Then I ...
WilliWespe's user avatar
0 votes
2 answers
43 views

Symbology to layers not working

I want to apply layer symbology to all TIFF in a group layer but it does not work: import arcpy mxd = arcpy.mapping.MapDocument("CURRENT") df = mxd.activeDataFrame groupName = "New ...
coral's user avatar
  • 81
1 vote
0 answers
358 views

ArcPy Pandas export spatial data frame to feature class

I am successfully creating two data frames with ArcPy and Pandas, 1) from an enterprise geodatabase feature class and 2) from an enterprise geodatabase table, then merging them into 3) data frame that ...
oldgrowth_forests_are_key's user avatar
1 vote
0 answers
89 views

SPI function on a dataframe versus on a raster stack?

I have a raster stack representing monthly precipitation values from 2007 to 2016. class : RasterStack dimensions : 360, 720, 259200, 120 (nrow, ncol, ncell, nlayers) resolution : 0.5, 0.5 (x, ...
Shunrei's user avatar
  • 41
0 votes
2 answers
201 views

Quickly generate multiple hillshades from DEMs in ArcGIS Pro

In ArcGIS Desktop I would usually use ImageAnalyst app where it was easy to quickly generate hillshade from DEMs that are in data frame. But I can't find anything similar in ArcGIS Pro version, except ...
Mirko Barada's user avatar
2 votes
3 answers
2k views

Creating GeoTIFF from Pandas DataFrame

I have a Pandas DataFrame that looks like this: SIF_743,latitude,longitude 0.7626782059669495,-85.90831756591797,22.40107536315918 0.3139636516571045,-85.9532470703125,22.630943298339844 0....
Rezwan's user avatar
  • 199
1 vote
1 answer
829 views

Merging points to linestrings using GeoPandas

I have two GeoPandas DataFrames: points (long,lat) : 60,000 rows Jams segment (LineStrings) : 204,000 rows I am trying to create a new DataFrame with the points that are located on LineStrings. I ...
Nati Elkayam's user avatar
2 votes
2 answers
752 views

"ValueError: Point coordinates must be finite." when reverse geocoding in DataFrame using GeoPy

I'm making a script in Python that takes the coordinates in a DataFrame, looks for the address and writes it in the DataFrame. My DataFrame for testing purposes: https://docs.google.com/spreadsheets/d/...
Bruno Rhuan's user avatar
5 votes
2 answers
4k views

Intersection of two GeoPandas Dataframes

I have two GeoPandas dataframes titre_polyG and df which I have intersected as follows: titre_polyG is as follows: 0 MULTIPOLYGON (((-7.64026 33.59134, -7.63996 33... 1 MULTIPOLYGON (((-7....
bravopapa's user avatar
  • 485
3 votes
1 answer
11k views

Reading .KML with GeoPandas

I am trying to read a .kml file (here is an example of the input): <name>99</name> <Style><LineStyle><color>ff0000ff</color></LineStyle><PolyStyle>&...
bravopapa's user avatar
  • 485
0 votes
1 answer
345 views

QThread crashes QGIS

I'm trying to use a QThread for CSV export that can freeze my UI. Therefore I have a polyvalent Thread class below : class Thread(QThread): finished = pyqtSignal() def __init__(self, fn, *...
dmjf08's user avatar
  • 1,293
1 vote
0 answers
229 views

Spatial join for checking whether a coordinate lies within a shape polygon

I've a database of coordinates that records lat,lon values in 2 separate columns as double. I'm trying to map these points to polygons within my shapefile using geopandas spatial join, but I keep ...
Viral Patangiya's user avatar
1 vote
1 answer
101 views

Tilting shapefile so it appears flat or seen on its edge

I don’t know exactly how to explain what it is I am trying to do so I will have to resort to a couple of pics. Hopefully that will explain it for me. I am trying to ‘tip’ shapefiles so that they are ...
skippy0070's user avatar
0 votes
0 answers
216 views

Incorrect number of dimensions in creating multiple plots using a for loop with ggplot2

I'm trying to map out all these different "solutions" from the prioritize model using ggplot. (To preface I'm very new to R so perhaps my code/methods are extremely rudimentary and why I'm ...
Nikita's user avatar
  • 1
6 votes
2 answers
3k views

Joining two Pandas DataFrames based on lat, long as fields

I have two Pandas DataFrames containing "lat" and "long" coordinates. I'd like to do a spatial join and merge columns from one DataFrame into another. import pandas as pd df1 = pd....
kms's user avatar
  • 483
3 votes
3 answers
9k views

Reverse geocoding of Pandas DataFrame with Lat/Long columns

I have a DataFrame with Lat/Long coordinates in separate series. I am trying to use GeoPy and Nominatim to get the reverse raw address. I keep getting errors such as: TypeError: reverse() takes 2 ...
BenW's user avatar
  • 623
1 vote
1 answer
809 views

Re-projecting shapefile in R that has class of character

I am trying to project a shapefile of the world that was downloaded from naturalearthdata.com shp is a shapefile of the worlds landmasses that I downloaded. When I use the code class(shp) R tells me ...
Lucy's user avatar
  • 11
0 votes
1 answer
377 views

ggplot - error data must be a data frame [closed]

Why do I have this error in my R code?
Sara's user avatar
  • 1
0 votes
1 answer
3k views

Cannot coerce class to a data.frame

I'm using R to run a random forest to predict the distribution of sediment classes in a study area. I have a .csv of the locations where sediment has been sampled, and rasters of all my predictor ...
Emily's user avatar
  • 3
0 votes
1 answer
2k views

Dataframe object is not callable

I have a dataset contains latitude, longitude and temp. I tried to draw a contour map of temp based on latitude and longitude on the world map. I need to mark the contour line intervals also in the ...
user199125's user avatar
1 vote
0 answers
48 views

How can I let R recognize my mosaic as a data frame so I can use the ggplot2 package in R

I have various climate projections for different values such. I extracted the certain values I needed using the brick function. Afterwards I took the average using the mosaic function. I want to use ...
Charles's user avatar
  • 11
0 votes
1 answer
253 views

Exporting data frames in layout into unique PDF for each using ArcMap

I have an MXD with 2 data frames. How can I export each Dataframe as a separate PDF?
Julie's user avatar
  • 1
2 votes
2 answers
426 views

QVariant error when converting DataFrame into attribute table using PyQGIS

I have a df which looks like that: ID Happy 0 Very 1 Little I'm trying to convert it into an attribute table: headers = [col for col in df.columns] fieldlist = QgsFields() fieldlist.append(...
Annie S.'s user avatar
  • 317
0 votes
0 answers
97 views

Updating layer in corresponding data frame in single MXD in ArcPy

I have a shapefile and a layer file. In the shapefile, I am updating the last column using a .dbf file, which has numeric values. So, the last column of the shapefile will be updated five times and I ...
G.S. J's user avatar
  • 323
1 vote
0 answers
326 views

Extract time series from CFSV2 Google Earth Engine Python

I'm trying to export to a dataframe the time series of the CFS model for the maximum temperature since 2000 for any latitude/longitude, but I have a Time Out problem. So, I tried a for each year and ...
Lucas Fagundes's user avatar
1 vote
1 answer
169 views

Iterating and updating through feature class fields based on DataFrame using ArcPy

I am updating mismatched data across two systems and have an Excel sheet that combines a consolidated data set. Unfortunately I do not have a reliable join field to relate this back to my GIS data. I ...
boberdorf's user avatar
  • 1,357
5 votes
3 answers
3k views

Appending DataFrame to existing layer in GeoPackage

I have scripts to download and extract two shapefiles every 24 hours and create a cleaned DataFrame. I want to append the DataFrame for each one to a specific layer in a gpkg. The only example I can ...
Julie's user avatar
  • 51
0 votes
0 answers
3k views

ValueError: 'ITEM' is both an index level and a column label, which is ambiguous

I'm trying to process some data, with geopandas0.9. Here is my code: locations = select_polygons.groupby(class_col).apply(lambda x: \ sample_locations_from_polygon(x, sample_on_boundary='...
Maifee Ul Asad's user avatar
0 votes
1 answer
48 views

Exporting 3 layers together as JPEG using Data Driven Pages

I'm trying to use data driven pages to export JPEGs of features that share a common attribute. E.g. I have two point layers, "beach" and "light". And a polyline that connects them, ...
Patrick Williams's user avatar
1 vote
1 answer
1k views

Placing multiple data frames in a single map layout in ArcGIS Pro

I am trying to prepare a layout for my study area by method showing country to state to city in ArcGIS Pro, but all the data frames are showing the same area and when I try to change the data, the ...
Bhargavi's user avatar
1 vote
1 answer
1k views

Transform Google Earth Engine script to Python with Landsat 8 temporal data

I am doing a study for my work and I need to adapt my Google Earth Engine script in Python, but I am encountering some problems. Here is a Google Earth Engine script: //Importing image and geometry: ...
Lucas Fagundes's user avatar
2 votes
1 answer
940 views

Create one id variable for each dataframe in a list of dataframes with name of each dataframe

I have a list of dataframes. For each dataframe I want to create one new variable or column called uniqueid and I want this unique id to be the name of the dataframe from the list. I have tried the ...
Marcel Campion's user avatar
-2 votes
1 answer
820 views

How to change column value by matching row value in data frame?

Say I do have the following table | longitude | latitude | temperature | label | |-----------|----------|-------------|-------| | x | y | z | 1 | | p | q | ...
Teacher's user avatar
  • 11
1 vote
1 answer
326 views

Exporting data frame as PNG after adding Layer File using ArcPy in ArcMap

My question relates to the answer found at Exporting data frame as PNG in ModelBuilder using ArcMap I've followed the steps in the answer provided by @PolyGeo, but my output PNG is just a blank image. ...
The Silent Cartographer's user avatar
2 votes
2 answers
688 views

Getting names and numbers in specific vectors from a dataframe in a loop R

I have a huge DataFrame, in which I need to extract some information that generates filenames that I need to search in my working directory later, I also need the value in each cell of the pixel ...
Kledson Lemes's user avatar
2 votes
2 answers
720 views

Selecting attributes by coordinates from DataFrame in Python

I wonder how to return the right information needed from this df. Currently I get an empty return. I think the problem is my selection because the coordinates are correct and all variables are as well....
Jonas Apelt's user avatar
4 votes
1 answer
6k views

Converting DataFrame to GeoDataFrame with Polygon [closed]

I would like to convert my DataFrame to GeoDataFrame, but every post is about points. I need to convert polygons. Coordinates are in df['geometry']. How can I do that? My DataFrame is below: I was ...
datasciencebegginer's user avatar
3 votes
1 answer
648 views

Can't Form DataFrame from Parallel Offset Output

I've been developing code to take a .csv with lat-long coords and convert them to LineStrings before creating parallel offsets for them. This has been working so far, but yesterday after clearing my ...
vbray6's user avatar
  • 31
2 votes
0 answers
60 views

Not able to extract values from raster TIFF in EPSG:26912, but can in EPSG:4326?

I have an elevation file (.tif) in EPSG:4326 and point data for wildfire occurrence in the same projection. When I use this projection, I can use the following code to extract the elevation value, for ...
marie Lenihan-Clarke's user avatar
2 votes
1 answer
943 views

Extracting polygon information from KML file into DataFrame

I have KML file from downloaded https://data.gov.sg/dataset/electoral-boundary_2020. As you can see on the website, there are 31 sub-polygons and each of them has a label. I have loaded the KML on R. ...
tatami's user avatar
  • 121
3 votes
1 answer
4k views

Converting DataFrame with geometry column into GeoDataFrame in Pandas

I have this DataFrame: In [120]: a Out[120]: a b c 0 111 333 [POINT (0 0)] 1 222 444 [POINT (0 0)] I am trying to convert with the next line, but it fails: In [125]: b = ...
tres.14159's user avatar
0 votes
1 answer
82 views

Restructure data.frame By Date Values in R [closed]

I have a data.frame in R shown below.. This data.frame summarizes counts by week for every year in a time series dataset. I am now trying to rearrange this matrix such that the years (2001-2020) will ...
Eli Simonson's user avatar
-1 votes
1 answer
27 views

What will be the coordinate system of base map layers added if the the coordinate of layer frame properties is MUTM in ArcGIS?

My coordinate frame is in MUTM that I have created. I have added base map layer and I want to know what coordinate system will it use.
sachin manandhar's user avatar
1 vote
0 answers
234 views

Export to PNG produces wrong color background (but not for JPG)

I need to export a map as a PNG image, but when I do the background, which is supposed to be white, comes out gray. This also happens when I export it as a TIFF or EMF, but not as a JPG. I have tried ...
Josh Colston's user avatar
0 votes
1 answer
688 views

Convert multiband GeoTIFF to dataframe using all bands (R, Python or QGIS) [closed]

I have a GeoTIFF file with 2 bands and I want to create a dataframe like this: pixelID | band1Value | band2Value I would like to do it in R, Python or QGIS. As far as what I have searched, I could ...
danalif's user avatar
  • 171
2 votes
1 answer
2k views

GeoPandas gdf.geometry.buffer for spatial join

In that part of the code I'm creating geodataframes (only point features) out of two CSV files. I want to merge all points from the two dataframes within a range of 150m. Therefore I create a buffer ...
Hade's user avatar
  • 31