POST
|
Hey all, I am working through Zanderberg's Python Scripting for Arcgis. I am on chapter 8 exercise 1 which asks me to create a box Shapefile from the coordinates (0,0), (0,1,000),(1000,0),(1,000,1,000). I am able to get the code work, but the final output looks like two triangles and not a box. I decided to remove one of the coordinates an indeed got a proper triangle so I am wondering if it has to do with how I typed out my coordinates in Notepad? See the screenshot of my code, input coordinates (.txt file) and output. Any help is appreciated. Also: I am new to this forum and coding in general and not sure how to code samples to show up in that snazzy window that lets me copy them so apologies for having all of this crammed into a screenshot.
... View more
03-10-2020
07:19 PM
|
0
|
2
|
919
|
POST
|
So another quick n00b question here. As I understood using the Python in the ArcMap interface, the syntax is kind of laid out for you. This how I have been learning party, following the prompts after each coma. How come the prompts are giving me the option to put in my FC in the rectangle parameter and not asking for a string of coordinates? Without manually copying and pasting the extents could you not run this tool in the ArcMap python window?
... View more
03-05-2020
02:30 PM
|
0
|
1
|
605
|
POST
|
So I was able to manually get the extents as a string the clip worked. Is there another tool (or Python operation) I can use that can get to extract the extent so this tool can be automated? When I use the tool in ArcMap I just specify that my extents will be that of the InputFile and the four coordinates populate automatically. Edit: Sorry I missed your link. I will dive into that and see what I can do!
... View more
03-05-2020
01:36 PM
|
0
|
0
|
605
|
POST
|
All is in the same coordinate system and I have set up my work space. I am just trying to get the syntax right for arcpy.Clip_management() I am working in the Python window in ArcMap and planing on later moving it into a IDLE. Question on the rectangle extents however, I would need that to be the extents of my InputFile (basically a project area). Shouldn't those parameters be automatically populated if I specify "InputFile" for my rectangle? I shouldn't have to type out four extent coordiantes each time I run the script because those are going to change each time the parameter changes. I appreciate your the help. I am a Python n00b and am trying to write a few scripts for practice. Thanks,
... View more
03-05-2020
01:05 PM
|
0
|
2
|
605
|
POST
|
Hello everyone, I am relatively new to scripting. I am going through Paul Zanderbergen’s Python book at the moment. I use Pro daily, but this book was written for ArcMap so I am using the ArcMap for these exercises. Here is my question: I am writing a script to extract land cover calcs from an input. I need to do a raster clip to extract a raster file, but only using the rectangle extents and not a full on clip. Naturally I can get the tool in ArcMap GUI to run just fine, but using the arcpy.Clip_management module I cannot, for the life of me, get it to run. Here is the code I am trying arcpy.Clip_management(“LULC","InputFile","LULCOutput.tif","InputFile","","ClippingGeometry","NO_MAINTAIN_EXTENT") I basically need a raster rectangle output of my input feature class to use in later parts of my script. Can anyone help me with my syntax to get this tool to run in python? I have the rest of my script ready to go, I just cannot get this tool to run in python. The image attached is how my file structure is set up (C:\LandCoverScript\GDB.gdb) Thanks!
... View more
03-05-2020
12:24 PM
|
0
|
7
|
714
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|