POST
|
What in your opinion? I have seen that this error show after insert into script a project raster, so i can project wgs84 utm 36 n to wgs84 geographic. I remenber that 10.1 have some bugs about project coordinate.....i'm wrong?
... View more
09-25-2016
12:24 PM
|
0
|
0
|
370
|
POST
|
Hi Dan, i have seen "Issues Addresses" but this function is same in the 2 version
... View more
09-25-2016
07:16 AM
|
0
|
2
|
370
|
POST
|
Hi at all, on my python script i set the Coordinate System for Data Frame of mxd and after a Zoom To function on firsy layer into list i export mxd as PNG. This is my code: mxd = arcpy.mapping.MapDocument('current') df = arcpy.mapping.ListDataFrames(mxd)[0] df.spatialReference = prjFile add_layer = arcpy.mapping.Layer("costumers_" +str(j)+".tif") arcpy.mapping.AddLayer(df, add_layer, "TOP") reclass_raster_lyr = arcpy.mapping.ListLayers(mxd)[0] arcpy.ApplySymbologyFromLayer_management(reclass_raster_lyr, Temp_Symbology) if reclass_raster_lyr.symbologyType == "RASTER_CLASSIFIED": reclass_raster_lyr.symbology.excludedValues = excludedValues reclass_raster_lyr.symbology.reclassify() lyrPolygonj = arcpy.mapping.Layer("customerlyr"+str(j)) df.extent = lyrPolygonj.getSelectedExtent() lyrPolygonj.visible = False strAux = listRow .split(" ")[1::] strOutput = date + " " + " ".join(x for x in strAux) + ".tif" world_file = True arcpy.mapping.ExportToPNG(mxd, strOutput,df, 10199, 7688,820,world_file = world_file, background_color = "255,255,255",transparent_color = "255,255,255") but when i run this script on ArcMap 10.2 the result is correct. When i run on ArcMap 10.1 the png result is not correct, i mean that if i add it into map this png have a shift respect the position of original file into mxd. I have try to execute manually the export png into arcmap 10.1 and the result is correct. So why in my script on 10.1 the result is shift? Thanks
... View more
09-25-2016
01:20 AM
|
0
|
4
|
1229
|
POST
|
Hi Dan, thank for your help. I have change the workflow into script and now works fine. Problem was the first clip of raster before resample. I have try to clip the raster with a big polygon and after run the resample but with cell size 0,5 and. After i have execute other clip on resample result with a smal shp and the ruslt is good. Now i have see other some strange but i will post it in other question
... View more
09-25-2016
01:14 AM
|
0
|
0
|
119
|
POST
|
Yes i have set 0.5 cellsize but the result is always the same. I have try to set into env cellsize value 0.5 and run replace with this value as cell size but result is always the same The bounds are not smooth
... View more
09-22-2016
05:11 AM
|
0
|
2
|
119
|
POST
|
Hi have try Dan but the result is always the same. I have a result clip with bounds not smooth
... View more
09-22-2016
03:02 AM
|
0
|
4
|
691
|
POST
|
Hi Dan this is my script def main(): print "Start script" arcpy.env.overwriteOutput=True arcpy.env.cellSize = 0.1 env.workspace = arcpy.GetParameterAsText(0) date = arcpy.GetParameterAsText(1) excludedValues = arcpy.GetParameterAsText(2) mxd = arcpy.mapping.MapDocument("Map.mxd") df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] strNdvi = "ndvi.tif" strNdviLayer = "ndviLayer.lyr" Temp_Symbology = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'ndviLayer.lyr') # Generate NDVI strRedImage = "Image1.jp2" strIVImage = "Image2.jp2" strPolygons = "polygon.shp" strPolygon = "polygon" sr = arcpy.Describe(strRedImage).spatialReference df.spatialReference = sr if not arcpy.Exists(strNdvi) and arcpy.Exists(strRedImage) and arcpy.Exists(strIVImage): rasNdvi = Divide(Minus(Float(strRedImage),Float(strIVImage)),Plus(Float(strRedImage),Float(strIVImage))) rasNdvi.save("ndvi.tif") print "NDVI created." the ndvi created have a cell size 10 x 10 , i have used Describe to see and this is the rest of code arcpy.MakeRasterLayer_management(strNdvi, "ndvilyr") lyrNdvi = arcpy.mapping.Layer(strNdvi) arcpy.mapping.AddLayer(df, lyrNdvi) lyr = arcpy.mapping.ListLayers(mxd)[0] ##Clip Raster Dataset with feature geometry arcpy.env.cellSize = 0.05 arcpy.Clip_management("ndvi.tif", "#", "ndvi_clip.tif",strPolygons, "0", "ClippingGeometry") print "clip ok" and the result is the second image, with bounds not smooth thanks
... View more
09-22-2016
01:04 AM
|
0
|
6
|
691
|
POST
|
Dan i have set arcpy.env.cellSIze = 0.5 and after i have run my arcoy clip but the result is the same. More bounds are not smooth
... View more
09-21-2016
03:26 PM
|
0
|
8
|
691
|
POST
|
Ok but i have deelop a script to add into custom toolbox
... View more
09-21-2016
02:22 PM
|
0
|
10
|
691
|
POST
|
Hi guys, i have a tiff image that into Arcmap i clip with Data Frame Clip using a shp file into data frame as mask to clip and i have the result that you can see into this image instead when i create a python script i can't use clip data frame so i use clip_managment or extract by mask with the same shp file but the result is different, you can see in this second image You can see that the bouds of clip are not smooth as first clip resulted by clip data frame. How i can resolve this problem and have the same result with bounds smooth? Thanks
... View more
09-21-2016
02:03 PM
|
0
|
12
|
1927
|
POST
|
Hi Alex, thanks for your replay. I know the https configuration for ArcGIS Server, but i must set only https or i can set a mix protocol? http / https? More external web app read the AGS Service in http. Thanks
... View more
09-07-2016
09:43 AM
|
0
|
1
|
295
|
POST
|
Hi att all, i have to install the GeoEvent Extension. reading the guide lines the GeoEvent Extension should be intall o a separe server, but i have one server and so i must to istall on the same server that have ArcGIS Server. I have seen that GeoEvent Extension work in https protocol, so my question is: the machine where i will install GeoEvent Extension must be in https protocol? Thanks
... View more
09-07-2016
01:05 AM
|
0
|
3
|
1477
|
POST
|
Hi Ken, the query with value = " 'V' " is ok. Now the sdeConn = arcpy.ArcSDESQLExecute("Database Connections/TEST.sde") works fine also without the query. I have copied and pasted my code into other ArcGIS enviromets and works fine. I suppose that on my machine after istall of python 3 there is something to wrong. Thanks to all
... View more
06-10-2016
03:26 AM
|
0
|
0
|
2367
|
POST
|
Hi Dan, thanks for your response. I have seen the example that you have attached and as Syntax require some parameters not optional, but the .sde contain itself all the parameter request: server, port, istance, use and psw etc Example if i set sde connection as workspace for a list table the script works so i suppose that the connection is open: arcpy.env.workspace = ("Database Connections/TEST.sde") tables = arcpy.ListTables() for t in tables: print(t)
... View more
06-08-2016
01:04 AM
|
0
|
0
|
2367
|
POST
|
Hi Doug, i have pasted the sde connection in other folder and after i have tried the script in this way but the result is always the same
... View more
06-08-2016
12:33 AM
|
0
|
0
|
2367
|
Title | Kudos | Posted |
---|---|---|
1 | 02-03-2019 04:44 AM | |
1 | 10-22-2015 02:46 AM | |
1 | 10-19-2017 01:03 AM | |
1 | 02-22-2017 07:15 AM | |
1 | 08-13-2019 09:09 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|