|
POST
|
Maybe try the reverse logic to this. Using the in operater you can check if a string contains a subtring, that way you don't need a wildcard for fp in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"): if 'FILE: ' in fp.text: fp.text = 'Document Path: <dyn type="document" property="path"/>' http://stackoverflow.com/questions/3437059/does-python-have-a-string-contains-substring-method
... View more
01-19-2017
10:04 AM
|
1
|
1
|
1317
|
|
POST
|
Just as a note, I would make sure to run the ListRasters and print all the raster names as the example states, to make sure that the tool is using the correct files for input into the Raster to NetCDF. Also if the rasters are in the NPP_2012A folder as I think they are from your code, you will need to make that your workspace when you use ListRasters.
... View more
01-19-2017
09:34 AM
|
1
|
1
|
4824
|
|
POST
|
your inRaster variable is currently a folder I believe and not the actual raster file. The input for the tool has to be a raster file(in your case it looks like .tif). If you have multiple rasters in that directory, you will need to make a list of them all and iterate through them, using each individual raster as input for the Raster to NetCDF Tool(See the link about the ListRasters). Please also note you will need unique output names for each output NetCDF file, or you will just be overwriting the prior file. http://pro.arcgis.com/en/pro-app/arcpy/functions/listrasters.htm
... View more
01-19-2017
09:31 AM
|
1
|
2
|
4824
|
|
POST
|
Could it be because of the parentheses that are in the file path to the table?
... View more
12-07-2015
09:16 AM
|
0
|
0
|
1744
|
|
POST
|
I thought about that a bit and not isn't equal to the raster, if the raster has null values in it. If you have say a landsat scene that has a bunch of null values in it for the scene edge, but that wasn't part of the area you wanted set null in the raster you were applying it to. You would only want to set null values to the existing raster where the raster you are using has existing values, not anywhere that is just extraneous null values to complete the whole grid.
... View more
12-02-2015
09:11 AM
|
1
|
0
|
3232
|
|
POST
|
Instead of using the word Not or the != expressionhave you tried using the Boolean Not (~). I didn't use the old raster calculator, but I think that might be the correct operator to replace the Not operator. ArcGIS Help (10.2, 10.2.1, and 10.2.2) SetNull(~ IsNull("water3a"), "Ecoregion.tif")
... View more
11-30-2015
08:09 AM
|
1
|
1
|
3232
|
|
POST
|
Yes you should be able to using Raster to Other Format. ArcGIS Help 10.1 Please note that GRID format is limited in length to 13 characters.
... View more
11-26-2015
08:59 AM
|
2
|
1
|
10931
|
|
POST
|
yea it took a few tries for me to find the right search. Plenty of threads on how to open files within python, but not a bunch on launching them externally.
... View more
11-25-2015
12:58 PM
|
1
|
0
|
2593
|
|
POST
|
If using windows, this is probably the easiest solution. Some people on stackexchange get a little overly pythonic. 15.1. os — Miscellaneous operating system interfaces — Python 2.7.11rc1 documentation
... View more
11-25-2015
12:49 PM
|
1
|
4
|
2593
|
|
POST
|
http://stackoverflow.com/questions/434597/open-document-with-default-application-in-python
... View more
11-25-2015
12:38 PM
|
1
|
6
|
2593
|
|
POST
|
I think this could be an issue of your printer not being able to print edge to edge if your dataframe is to close to the edge of the page. Since most printers have to leave margins, there are two ways for it to compensate for this, either by scaling the image down to fit its margins(what is happening here I believe), or by cutting off some of the map with white space for the margins. Also I'm curious why you are printing straight out of Arc, I always export out to PDF then print, generally looks better to me and gives you better options for handling margin issues when printing.
... View more
11-25-2015
11:27 AM
|
1
|
1
|
2552
|
|
POST
|
The warning should pass on its own (Warning 000132.....), but the runtime error is the issue. Looking at your code, you are running the Define Projection against the description object you made, shouldn't it be running it with the file names?
... View more
11-11-2015
07:11 AM
|
1
|
4
|
3863
|
|
POST
|
You might want to look at the Define Projection Help, they give a good example on the standalone script for using try/except blocks to handle error messages. ArcGIS Help 10.1 Also just as always a reminder that Define Projection is only to be used when a a file has an unknown coordinate system or is currently using an incorrect coordinate system. "The most common use for this tool is to assign a known coordinate system to a dataset with an unknown coordinate system (that is, the coordinate system is "Unknown" in the dataset properties). Another use is to assign the correct coordinate system for a dataset that has an incorrect coordinate system defined (for example, the coordinates are in UTM meters but the coordinate system is defined as geographic)." Also may I recommend that you do not put spaces in your filepaths anywhere, they have a bad habit of messing up some geoprocessing tools. You may want to rename your folder to remove the space. Hope this helps
... View more
11-11-2015
06:57 AM
|
1
|
6
|
3863
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-22-2017 08:58 AM | |
| 1 | 10-05-2015 05:43 AM | |
| 1 | 05-08-2015 07:03 AM | |
| 1 | 10-20-2015 02:20 PM | |
| 1 | 10-05-2015 05:46 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|