POST
|
Hi All, Has anybody tried integrating CityEngine with LumenRT? Great if you could share experiences, tricks and any cool output animations. Thanks in advance, Ian
... View more
07-15-2014
09:01 PM
|
0
|
4
|
906
|
BLOG
|
Just to get the ball rolling....Last month I stumbled across the following two Global Forest/Land cover mapping efforts: 1. Land Cover (GLCNMO), Vegetation (Percent Tree Cover) http://www.iscgm.org/browse.html Which is Japanese led effort that mapped the world at 500 m resolution."Version 1" uses Modis 2003 imagery. "Version 2" uses Modis 2008 imagery. Unfortunately no newer dates so most of the big resent Cambodian deforestation missing but still looks like quite a reasonable mapping effort if you don't mind using a land cover back dating back to 2008. 2. Global Land Cover-SHARE of year 2014 - Beta-Release 1.0 http://www.glcn.org/databases/lc_glcshare_en.jsp Which is yet another steaming pile of codswallop from the FAO. For example, according to this map Cambodian forests apparently consist mostly of 100% crown cover. Such a complete waste of time and effort.UN REDD is really dead when FAO persists in putting utter crap like this out in the public. Enjoy, Ian
... View more
07-15-2014
09:17 AM
|
1
|
1
|
1781
|
BLOG
|
A list of GIS Career sites 1. ESRI Career http://www.esri.com/careers 2. Directionsmag Career http://www.directionsmag.com/careers/ 3. Earthworks Job http://www.earthworks-jobs.com 4. Geosearch http://www.geosearch.com 5. GISCareers http://www.giscareers.com 6. GIS Connection http://www.gisconnection.com 7. GIS Jobs Clearinghouse http://www.gjc.org 9. GISJobs http://www.gisjobs.com 10. GIS Lounge http://gislounge.com/gis-career-resources 11. GIS User http:http://www.gisuser.com/component/option,com_jobline/Itemid,132/
... View more
07-15-2014
09:04 AM
|
8
|
2
|
2135
|
POST
|
Hi All, So 10.1 is now here... I'm looking for the Python add-ins that will be able to do this neat trick "Getting XY from mouse click using python": Specifically I would like to rewire the Fishnet function in ModelBuilder so that the user can simply click the screen to set both origin_coord & y_axis_coord interactively rather than having to type all coordinates in.... CreateFishnet_management(out_feature_class, origin_coord, y_axis_coord, cell_width, cell_height, number_rows, number_columns, {corner_coord}, {labels}, {template}, {geometry_type}) Very grateful if anybody can point me in the right direction. Many thanks, Ian
... View more
07-27-2012
10:15 PM
|
0
|
0
|
2344
|
POST
|
Dear ArcPy & Python Folk, I now find the relevant help section here: '>http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Integrating_scripts_within_a_model/002w0000006n000000/ which mentions setting up parameter properties on the script and then shows the use of the following example setup code: import sys, string, os, arcgisscripting gp = arcgisscripting.create(9.3) tablePath = gp.GetParameterAsText(0) But only provides just one example... Little bit of ArcPy Voodoo there... What exactly is "arcgisscripting" and where is this python module more fully documented? Is this still the best way to do things in ArcGIS 10.1? Where are there more examples of doing this? I can now alter my script as follows: import arcpy import sys, string, os, arcgisscripting gp = arcgisscripting.create(9.3) mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd,"Imagery")[0] lyr = arcpy.mapping.ListLayers(mxd, "High_resolution", df)[0] # Trying to get %output_value% as an in-script variable scriptVar = gp.GetParameterAsText(0) # Use the SelectLayerByAttribute tool to select and # zoom to the selection arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", "Area = '%output_value%'") df.zoomToSelectedFeatures() arcpy.RefreshActiveView() outfile = "test" + scriptVar + ".jpg" arcpy.mapping.ExportToJPEG(mxd, r"C:\Test\\" + outfile, df, df_export_width=1600, df_export_height=1200, world_file=True) # Clear the selection and refresh the active view arcpy.SelectLayerByAttribute_management(lyr, "CLEAR_SELECTION") arcpy.RefreshActiveView() And I finally get a test1.jpg...test2.jpg...test3.jpg indicating the ModelBuilder %output_value% has been successfully passed to scriptVar one time also correctly zooming to the first polygon:)!! Many thanks for the advice. Ian
... View more
07-27-2012
08:40 PM
|
0
|
0
|
625
|
POST
|
Greetings Chris, Many thanks for the advice.... Unfortunately I'm not sure yet how your suggested solutions can be implimented for my particular problem. I actually need to eventually implant my python script in a much larger model...so I really need the ModelBuilder to do the "Iteration Feature Selection" (and other things) before firing up the python script. With this requirement in mind creating a cursor inside the script itself instead is unfortunately not a useable solution. Regarding your other suggestion: I have tried using arcpy.GetParameterAsText(0) but without success. Actually still really struggling to find out how to do this properly...it would seem a very good thing to be able to do in so many other situations as well not just for this particular problem. Specifically I could summarize my problem to a more general question: My model (in ModelBuilder) keeps updating a variable, %output_value%, that is the only precondition to a python script (also in the model). How do you successfully pass that variable (from ModelBuilder to the python script) so that it becomes an in-script variable (eg. InScriptVar) equal to the new value of %output_value% each time the python script is called. The following attempt unfortunately does not appear to work... InScriptVar = arcpy.GetParameterAsText(0) Result InScriptVar does not receive anything.... PS. Incidentally what is the easiest way/trick to see what is going on with variables inside a python script when it is executing embedded inside of a ModelBuilder workflow? Many thanks again for all your advice. Ian
... View more
07-27-2012
05:39 PM
|
0
|
0
|
625
|
POST
|
Dear ArcPy & Python Folk, I am trying to make a fairly simple model in ArcGIS10.1 ModelBuilder to do the following: i) Iterate through a polygon feature layer (High_resolution.shp). ii) As each new polygon is selected fire up a python script (Zoomer1.py) that zooms to the selected polygon and exports a Geojpeg Model looks like this: [ATTACH=CONFIG]16405[/ATTACH] Code for the Zoomer1.py script looks like this: import arcpy mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd,"Imagery")[0] lyr = arcpy.mapping.ListLayers(mxd, "High_resolution", df)[0] # Use the SelectLayerByAttribute tool to select and # zoom to the selection arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", "AreaID = '%output_value%'") df.zoomToSelectedFeatures() arcpy.RefreshActiveView() # Export the map to a .jpg # Next Line Wrong! Outputs a jpeg actually called "test%output_value%.jpg" # outfile = "C:/Test/test" + "%output_value%" + ".jpg" # Next Line Wrong! Gives Syntax error # outfile = "C:/Test/test" + %output_value% + ".jpg" # Works.... outfile = "C:/Test/test1.jpg" arcpy.mapping.ExportToJPEG(mxd, outfile, df, df_export_width=1600, df_export_height=1200, world_file=True) # Clear the selection and refresh the active view arcpy.SelectLayerByAttribute_management(lyr, "CLEAR_SELECTION") arcpy.RefreshActiveView() My problem: I can not get the Exported Jpeg filename to change each time for a new polygon. Ideally I would like a series of output jpegs for each poly: test1.jpg. test2.jpg, test3.jpg, etc.... Current script is not able to recognize the ModelBuilder variable %output_value% when trying to form the outfile name. However, I can leave the output file as static name (eg. "C:/Test/test1.jpg") and then manually periodically check it: It is working correctly and a new geojpeg for each polygon is being made (but unfortunately overwriting the previous jpeg). Quite confused as this would indicate that the ModelBuilder variable is getting passed correctly to the Zommer1.py script eg: "arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", "Area = '%output_value%'")" is working correctly.... So how do I successfully use the ModelBuilder %output_value% to make sequential filenames??? Or is there some other work-around? Didn't really expect this to be such a problem.... PS. I also observe that arcpy.RefreshActiveView() is also not updating the screen for each new polygon (which would be nice). Many thanks in advance for your advice, Ian Thomas
... View more
07-25-2012
05:18 PM
|
0
|
4
|
773
|
Title | Kudos | Posted |
---|---|---|
1 | 07-15-2014 09:17 AM | |
1 | 07-24-2014 07:35 PM | |
8 | 07-15-2014 09:04 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|