Skip to main content

Questions tagged [python]

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

143 votes
5 answers
30k views

I would like to be able to script some things that are not exposed via arcgisscripting or ArcPy. How do I access ArcObjects from Python?
matt wilkie's user avatar
  • 28.3k
102 votes
27 answers
173k views

I asked this question on Stack Overflow before I realised this site existed. As this site it more appropriate, I'll ask it here too. I'm trying to install gdal from pip pip install gdal inside a ...
Kevin's user avatar
  • 1,121
98 votes
10 answers
257k views

This site returns Point: X: -11705274.6374 Y: 4826473.6922 when you search with the first key value of 000090, as an example. I assume that this is a spatial reference. I am looking for instructions, ...
Vincent's user avatar
  • 1,091
80 votes
3 answers
124k views

This seems like a simple enough question, but I can't figure out how to convert a Pandas DataFrame to a GeoDataFrame for a spatial join? Here is an example of what my data looks like using df.head(): ...
atkat12's user avatar
  • 1,599
78 votes
12 answers
18k views

I seem to use ESRI's ArcPy site package for virtually all of my Python geoprocessing. To ESRI's credit, these are an incredible suite of tools that can help accomplish a great deal. However, I would ...
Aaron's user avatar
  • 52k
74 votes
9 answers
86k views

I've got two geodataframes: import geopandas as gpd from shapely.geometry import Point gpd1 = gpd.GeoDataFrame([['John',1,Point(1,1)],['Smith',1,Point(2,2)],['Soap',1,Point(0,2)]],columns=['Name','ID'...
RedM's user avatar
  • 1,695
70 votes
2 answers
236k views

My question is an extension of Vertical lines in a polygon shapefile. There you will see a method of generating vertical lines with respect to the bounding box, at user-defined spacing. I understand ...
Akhil's user avatar
  • 1,445
59 votes
6 answers
88k views

Is it possible to use some gdal API to call gdal_translate from Python code? I do not mean simply executing the gdal_translate.exe from the file system, but rather call it somehow in code so I do not ...
Katie E.'s user avatar
  • 649
58 votes
3 answers
64k views

Is there an easy way of transforming Shapely objects (namely, Polygons and MultiPolygons) from one projection to another without having to dig around and extract coordinates by hand? In fact, I don'...
Chris Fonnesbeck's user avatar
55 votes
3 answers
32k views

Here is a contour map for which all the polygons of levels are available. Let ask how to smooth the polygons keeping all vertices preserved in their exact locations? Indeed the contour is made on ...
49 votes
17 answers
37k views

In your opinion, what is the best book/site to learn Python with GIS goals in mind? By "best", I mean: not very long (book) easy to understand (book/site) good practical examples (book/site) For ...
45 votes
7 answers
67k views

Is there a way to get the corner coordinates (in degrees lat/long) from a raster file using gdal's Python bindings? A few searches online have convinced me that there is not, so I have developed a ...
EddyTheB's user avatar
  • 1,985
45 votes
2 answers
62k views

I have a list of dataframes, all of the same structure and all are polygons. How can I add them all together using geopandas?
Philipp_Kats's user avatar
  • 2,064
43 votes
5 answers
73k views

I'm new to GIS. I have some code that converts infrared images of Mars into thermal inertia maps, which are then stored as 2D numpy arrays. I've been saving these maps as hdf5 files but I'd really ...
EddyTheB's user avatar
  • 1,985
43 votes
3 answers
30k views

I wondered if it is possible to look at the contents of a shapefile using Python without having and ArcMap license. The situation is that you can create shapefiles from many different applications, ...
Caitlin's user avatar
  • 433

15 30 50 per page
1
2 3 4 5
818