POST
|
Hi, It looks perhaps simple, but I am looking for the proper syntax in Python in order to print integer field correctly when running a script. For the time being, I get: ID:1.0000080689e+11 with: gp.AddMessage("ID:" + str(input_text)) And I would prefer the proper integer value... What would be the syntax to format it correctly? Thanks
... View more
11-25-2015
11:51 PM
|
0
|
2
|
3120
|
POST
|
Hi, I tend to work with Mosaic Dataset to store and manage STRM DEM tiles. However, I noticed that when the Mosaic Dataset raster information are not present (see attached), certain geoprocessing fails! For no reason, I sometimes get the raster information (see attached), and all problems are solved. I would be grateful if somebody could let me know how to calculate/update these raster information. Regards
... View more
06-26-2015
06:37 AM
|
0
|
0
|
2123
|
POST
|
Unfortunately, the Profile Graph button works only if the shapefile is z enabled with values... It doesn't stack the z values from an underlying raster as the Stack Profile tool...unless I miss something. Thanks
... View more
06-22-2015
05:26 AM
|
0
|
0
|
2473
|
POST
|
Thank you It works great (see attached). I just had to make sure my project was projected in order to get meters/kilometres for the x axis... However, Properties and Advanced Properties are very limited as usual with ArcGIS with charts formatting, and even bug! (shown attached). At least, with the attribute table, I can rework the charts in Excel but it is all manual and cannot automatized the workflow easily in ArcGIS!
... View more
06-22-2015
05:24 AM
|
0
|
0
|
2473
|
POST
|
Hi, I have a line shapefile and I would like to extract elevation value from a raster DEM in order to create an elevation profile. As shown attached... Is there a smart was of doing this in ArcGIS? Thanks
... View more
06-16-2015
07:16 AM
|
1
|
5
|
14454
|
POST
|
Thanks For no reason, my North American image was tricky to georeference and the Data.gov portal has plenty of imagery (ans WMS) for download. Though, I haven't find a nice North American grey relief-shaded yet... Just for conterminous United States so far. Need to look more into the images available.
... View more
05-06-2015
08:15 AM
|
0
|
0
|
267
|
POST
|
Hi, I got a shaded-relief image for North America from the USGS but it is not georeferenced. Attached are the characteristics of the image in ArcCatalog, and the extent was filled-in by the .tfw file I made, as attached. Looking at the image, I guessed the upper-left corner was long -130 and lat +60. Still according to the image, I found the upper-right corner long -50 and lat +60 while bottom-left long -130 and lat +15 With 9600 columns, the cell size would be: (130-50) / 9600 = 0.008333333°, which is 30''. Looks good And with 7240 rows, the cell size would be: (60-15) / 7240 = 0.006215469°, whi ch is roughly 22''. Not as good. Even with a .tfw with these values do not update the Cell Size in the image in ArcCatalog. Why? Usually, it does... Also, would it be possible to have rectangular pixel? I guess why not... Does the number of bands, which are 3, change anything in georeferencing the image? How could I convert the image from 3 bands to 1 bamd only? Thanks for your help
... View more
05-04-2015
09:32 AM
|
0
|
3
|
3276
|
POST
|
Hi, To finish this discussion, the world file .gfw is correct but the spatial reference is unknown in the .gfw. When opening the .gif image in ArcMap, you still get the "missing spatial reference..." warning (see attach), but it will place itself assuming the image is WGS84, and then reprojecting properly. In order to explicitly indicate the spatial reference, or GCS, you need to right-click and edit the Spatial Reference of the raster and indicate it is WGS84, as shown attach. And it solves the problem completely.
... View more
03-13-2015
07:22 AM
|
0
|
0
|
1503
|
POST
|
I tried to open the .gif raster in a blank ArcMap session and I still get the "missing spatial information message..."! Ian, would you be able to upload the .gfw you made and I could try it. Cheers
... View more
03-11-2015
09:34 AM
|
0
|
1
|
1503
|
POST
|
I just fixed the decimals in the .gfw file but still do not work! 0.066666666666667
0.000000
0.000000
-0.066666666666667
140
-10
Were you able to make a proper .gfw file with the attachments I uploaded? Cheers
... View more
03-11-2015
09:05 AM
|
0
|
3
|
1503
|
POST
|
Hi, I have a SRTM30 tile named E140S10.gif attached, containing 600 column and 750 rows. The upper left corner is 140° W, thus +140 and 10°S, thus -10, according to the filename... In a text editor, I tried to create a georeferenced file .gfw (attached): 0.066666666
0.000000
0.000000
-0.066666666
140
-10 I calculated the 0.06666666 by dividing 40° (width of the tile) / 600 pixels = 0.0666666666 and 50° (height of the tile) / 750 pixels = 0.0666666666 The gfw seems correct and has the same name as the .gif file, located in the same directory, but do not open in ArcMap. I get an error "missing spatial reference...". I don't understand why?
... View more
03-11-2015
07:46 AM
|
0
|
9
|
5557
|
POST
|
Hi, I am currently working with SRTM v3 datasets and I am confused with the behaviour of the Spatial Analyst Tools -> Extraction -> Extract Multi Values To Points (see attached). If I run the tool on a mosaicked STRM raster, the extracted values are correct and match to the raster (see attached in ArcMap, in this example 7 meters height). However, if I run the same tool with a single STRM v3 tile (from USGS Earth Explorer), I got 51 meters which is wrong! Why would the Extract Multi Values To Points work well with a mosaic raster made from a batch of SRTM tiles when it doesn't work with the individual tiles? Weird? Also, If I use the Extract Values to Points tool, I get the correct results, but it creates an output feature class every time you run the tool and if I was processing tons of tiles, it would create tons of new feature classes... Any help? Cheers
... View more
03-05-2015
05:49 AM
|
0
|
1
|
3747
|
POST
|
Thanks Daren, In the codeblock, I now reference to the varaible elev in the return statment instead of the !ELEV! field directly. It is smarter. However, what make the script crashing is the the CalculateField_management do not accept Null values for shapefile! Null values are possible only in Geodatabase, apparently. It means, when elev = 0, CalculateField_management could not write Null in the "ELEV_METER" field... Now it works as below: expression = "getElev(!ELEV!)"
codeblock = """def getElev(elev):
if elev <> 0:
return elev
else:
return -99"""
arcpy.CalculateField_management(fc, "ELEV_METER", expression, "PYTHON_9.3", codeblock)
... View more
03-04-2015
06:47 AM
|
0
|
0
|
364
|
POST
|
Hi, In ArcGIS Advanced for Desktop 10.2, I am trying to calculate a field "ELEV_METER" in a shapefile with an expression and code-block as here: expression = "getElev(double(!ELEV!))" codeblock = """def getElev(elev): if elev <> 0: return !ELEV!""" arcpy.CalculateField_management(fc, "ELEV_METER", expression, "PYTHON_9.3",codeblock) trying to apply ressources from ESRI: http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000004m000000 The calculate field should be done only if the field ELEV is not 0, then the if statment... But is does not work! Any guess? Cheers
... View more
03-03-2015
10:06 AM
|
0
|
2
|
4497
|
POST
|
Thanks, it did help but I could not make the syntax work, so I wrote: "NAME " + "LIKE " + "'" +strField_NAME.replace("'", "''") + "'" ...but I could have replaced the single quote with anything because this SQL is just to make a feature layer. Also, I could use the same technique with any other character Python and/or SQL would not like.
... View more
02-03-2015
05:50 AM
|
0
|
0
|
672
|
Title | Kudos | Posted |
---|---|---|
1 | 05-24-2018 02:11 AM | |
1 | 12-12-2023 08:54 AM | |
1 | 11-22-2023 08:59 AM | |
1 | 10-03-2023 06:03 AM | |
1 | 04-13-2022 12:55 AM |
Online Status |
Offline
|
Date Last Visited |
01-30-2024
04:03 PM
|