Using Update Cursor?

Using Update Cursor?

I am currently trying to get my update cursor to populate every row in each attribute table for 175 different feature class fields. I have written the script and it is populating the first row but all the next rows are coming out "NULL" (blank).

This is my script

import arcpy, csv geodatabase = "C:Userskd16342TSB_Values_ProjectToolRasterTool.gdb" csvfile = "C:Userskd16342TSB_Values_ProjectDocumentsScriptsServicesforMosaic.csv" #change "Ecosystem Services" to "Ecosystem" fields = ["Ecosystem","Cur_Con","Scale_Efft","Eff_Con","Recover","Typ_of_ser","Services","Eff_on_ser","Dur_s_aff","Reason","Eff_Durat","Unique_ID","Serv_ad_af","Serv_pe_af"] arcpy.TableToTable_conversion(csvfile, geodatabase, "ServicesforMosaic") for x in range (9,176): with arcpy.da.SearchCursor(geodatabase+"//ServicesforMosaic",fields) as scursor: for rw in scursor: if rw[11] == str(x): with arcpy.da.UpdateCursor("C:Userskd16342TSB_Values_ProjectToolRasterTool.gdbUnique_ID_"+x,fields) as ucursor: for row in ucursor: row[0] = rw[0] row[1] = rw[1] row[2] = rw[2] row[3] = rw[3] row[4] = rw[4] row[5] = rw[5] row[6] = rw[6] row[7] = rw[7] row[8] = rw[8] row[9] = rw[9] row[10] = rw[10] row[11] = rw[11] row[12] = rw[12] row[13] = rw[13] ucursor.updateRow(row) del cursor, row

All helped welcomed!!!

You might try settings a WHERE clause on your Search Cursor instead. So, something like:

for x in range(9, 176): query = '"Unique_ID" = {0}'.format(x) with arcpy.da.SearchCursor(geodatabase + "/ServicesforMosaic", fields, query) as scursor: for rw in scursor: with arcpy.da.UpdateCursor("C:/Users/kd16342/TSB_Values_Project/Tool/RasterTool.gdb/Unique_ID_" + str(x), fields) as ucursor: for row in ucursor: row[0] = rw[0] row[1] = rw[1] row[2] = rw[2] row[3] = rw[3] row[4] = rw[4] row[5] = rw[5] row[6] = rw[6] row[7] = rw[7] row[8] = rw[8] row[9] = rw[9] row[10] = rw[10] row[11] = rw[11] row[12] = rw[12] row[13] = rw[13] ucursor.updateRow(row)

Also, when using thewithstatement you don't need to del the row or cursor. So, you can removedel cursor, rowfrom your code.

Using geographic information systems in injury research

Purpose: To provide an overview of geographic information systems (GIS) and to discuss current and future applications in injury and trauma research.

Design: Literature review and discourse of GIS technology related to injury and trauma research.

Method: A search of scientific literature databases, text books, and online resources was undertaken to describe the current and prospective uses of GIS in injury and trauma research.

Results: Geographic information systems are computerized mapping systems that link information from different data sets spatially. The advantage of GIS is the capability to graphically display different attributes of an area in a way that is easily interpretable. Geographic information systems have been used to study injury rates, describe populations at risk for injury, examine access to trauma care, and develop and assess injury prevention programs.

Conclusions: Geographic information systems are tools for injury researchers to analyze injury rates and risks and to describe their results with colorful maps and graphics that allow the public to see how injuries affect their communities.

About Setting Geographic Location


Inserting geographic location information to a drawing file makes points within the drawing correspond to geographic locations on the surface of the Earth.

Geographic location information in a drawing file is built around an entity known as the geographic marker. The geographic marker points to a reference point in model space that corresponds to a location on the surface of the earth of known latitude and longitude. The program also captures the direction of the north at this location. Based on this information the program can derive the geographic coordinates of all other points in the drawing file.

Typically a geographic location is defined by its coordinates (for example, latitude, longitude, and elevation) and the coordinate system (for example, WGS 84) used to define the coordinates. Moreover, the coordinates of a location can differ from one GIS coordinate system to another. Hence, when you specify the geographic location of the geographic marker, the system also captures the details of the GIS coordinate system.

Typically CAD drawings are unitless and are drawn at 1:1 scale. You are free to decide the linear unit a drawing unit represents. GIS systems, on the other hand, allow the coordinate system to decide the linear units. In order to map CAD coordinates to GIS coordinates, the system needs to interpret CAD drawing units in terms of linear units. The system uses the setting stored in the INSUNITS system variable as the default linear measurement of a drawing unit. However, when you insert geographic location information, you have the option of specifying a different linear measurement (for a drawing unit).

After you insert a geographic marker in a drawing, you can:

  • Make the program automatically determine the angle of sunlight when you perform sun and sky simulation (photometric studies).
  • Insert a map from an online maps service in a viewport.
  • Perform environment studies.
  • Use position markers to mark geographic locations and record related notes.
  • Locate yourself on the map in real-time on systems that support location sensing.
  • Export to AutoCAD Map 3D, and expect the model to position itself automatically.
  • Import raster files that contain geographic location information and expect them to position themselves automatically (This requires AutoCAD Raster Design).

You can remove geographic location information from a drawing file using the GEOREMOVE command. The geographic marker and GIS coordinate system are removed from the drawing file. However, position markers continue to remain in the drawing file.

8 Answers 8

This is because of a flaw in the way Windows 95 generates events, and the fact that many applications are event driven.

Windows 95 applications often use asynchronous I/O, that is they ask for some file operation like a copy to be performed and then tell the OS that they can be put to sleep until that operation finishes. By sleeping they allow other applications to run, rather than wasting CPU time endlessly asking if the file operation has completed yet.

For reasons that are not entirely clear, but probably due to performance problems on low end machines, Windows 95 tends to bundle up the messages about I/O completion and doesn't immediately wake up the application to service them. However, it does wake the application for user input, presumably to keep it feeling responsive, and when the application is awake it will handle any pending I/O messages too.

Thus wiggling the mouse causes the application to process I/O messages faster, and install quicker. The effect was quite pronounced large applications that could take an hour to install could be reduced to 15 minutes with suitable mouse input.

Yes, it's a real effect resulting in causing a measurable speed up and can be reproduced at will:

Try opening a large file with Notepad on a contemporary machine. The window must not be full screen. When loaded, mark all text using the mouse (the keyboard works as well, it just needs more manual skill). While still holding the button down (and marking) move the mouse down, so the text gets marked and scrolled. Now compare the scroll speed while holding the mouse still versus wiggling it. Depending on your machine the speed up can be several times faster.

It can be viewed in many other programs as well, Notepad is just an easy to reproduce example. It's related to the way multitasking worked in early versions of Windows. Here everything revolved around the message queue. Wiggling the mouse resulted in a flood of mouse-move messages, which in turn made programs wake up more often and (depending on their structure) updating their states each time, going into the message loop again, giving time to screen updates, resulting in an over all faster reaction. It shows a glimpse of the ways MS used to make Windows rather responsive despite its cooperative threaded nature.

It wasn't just Windows 95, but Windows 3.x as well, even though they work very differently.

Other answers talk about pre-emptive multitasking, so let's first clarify this:

Window 3.x was using cooperative multitasking where each app would release the cpu for the other apps to use it. Windows 95 uses pre-emptive multitasking where each app is allocated a time slice.

The answer is linked to how the graphic interface works: in a windows graphical app, there is a loop called the 'message pump':

Every event (mouse moved, window got resized, etc) is pushed into a queue. The app is responsible to check if it has messages waiting and, if yes, pull them and process them.

This is at this moment that Windows 3.x was switching to other apps since there was a single point where all apps where going to, but this doesn't apply to windows 95.

What really happens is that, on both OS, you need to process the message loop, but if you want to update something in the background, like a task, a display update, etc, you'd set a timer and the timer would put a message in the queue at a regular interval.

These were better ways to do things on Windows 95, but developers took time to transition from Windows 3.x and many apps were structured the same.

Since the main mechanism was to rely only on the message loop and background operations were done through timer messages, moving the mouse would trigger a lot of messages, move the app up in priority, wake the app up, and get the app to process the background tasks messages. Without moving the mouse, the timer messages would be read up only at a rather slow interval.

The most famous app for this was the disk defragmenter where operations would wait for a message to update the graphic interface! so shaking the mouse would speed up the defrag.


FIG. 1a is a schematic block diagram of a system for implementing the present invention.

FIG. 1b is a schematic representation of the graphic user interface display of the network accessible tool of the present invention.

FIG. 2 is a flow diagram illustrating the overall process for using the network accessible tool.

FIG. 3 is a flow diagram illustrating the process for displaying affiliate information.

FIG. 4 is a flow diagram illustrating the operation of a metes and bounds tool.

FIG. 5 is a flow diagram illustrating the operation of the latitude/longitude drawing tool.

FIG. 6 is a flow diagram illustrating the operation of the cursor drawing tool.

FIG. 7 is a flow diagram illustrating the process for printing a map.

FIG. 8 is a flow diagram illustrating the process for e-mailing a map to another party.

FIG. 9 is a flow diagram illustrating the method of e-mailing the network accessible tool to another party.

FIG. 10 is an illustration of a table of latitude/longitude coordinate pairs.

FIG. 11 is a table illustrating distance and direction information used in a metes and bounds description.

FIG. 12 is a flow diagram illustrating the acreage calculation tool.

FIG. 13 is a flow diagram illustrating the operation of the cursor information tool.

FIG. 14 is a flow diagram illustrating the operation of the location search tool.

FIG. 15 is a flow diagram illustrating one manner in which the cursor tool may be used in conjunction with the metes and bounds tool.

FIG. 16 is a flow diagram illustrating one manner in which the metes and bounds tool can be used in conjunction with the lat/long tool.

FIG. 17 is a flow diagram that illustrates one manner in which the cursor tool may be used in conjunction with the lat/long tool.

FIG. 18 is a flow diagram that illustrates the manner in which a GPS receiver can be used in conjunction with the lat/long tool and the metes and bounds tool.

FIG. 19 is a flow diagram illustrating the manner in which the cursor drawing tool can be used in conjunction with the lat/long tool and a GPS receiver.

Activity 1: Fisheries and Seafood Consumption

Students identify and characterize important fishing regions on a world map. Then they use an online interactive to research the location, sustainability, and level of human consumption for a variety of seafood fisheries.


1. Have students identify important fishing regions and their geographic and ecological features.
Arrange students in pairs and give each pair a copy of the Major Fisheries of the World map and chart. Using the Water Planet Mega Map, included in the World Physical MapMaker Kit, point out the five important fishing regions one at a time. Use the information provided in the Teacher Guide for Marine Fisheries Discussion to discuss the geographic and ecological features that characterize the different fishing regions. These features are what make the regions such good fishing areas. During the discussion, have one student from each pair use shading and labeling to identify the regions on their map. Have the other student in each pair fill in the chart. Throughout the activity, have students take turns working on the chart and the map.

2. Discuss the relationship between fisheries regions, fish ecology, and human consumption of seafood.
Explain to students that the types of fish found in these regions depend on the habitat and food sources that are available. Some fish are primary consumers, while others are top predators. Some, like salmon, pollock, and cod, live in cold ocean waters others, like tuna and mackerel, adapt to warmer waters. Groundfish include cod, sole, rockfish, haddock, and flounder, which spend a part or all of their life on or near the bottom. Others, like herring and anchovies, live near the surface. State that numerous factors have contributed to what is being called a “global fisheries crisis.” Ask: What do you think that means? Elicit from students that many global fisheries are overfished and threatened by multiple human impacts, including improvements in fishing methods and technology, as well as increases in the number of fishing fleets, coastal human populations, and demand for seafood. Scientists estimate that humans have removed as much as 90 percent of the ocean’s large predatory fish, including sharks, swordfish, and cod. In some countries, up to 70 percent of the protein consumed comes from seafood.

3. Show students the Impact of Seafood interactive and have them complete their worksheets.
Project the National Geographic Impact of Seafood interactive and have students watch the introductory video by Enric Sala. Then click on the Seafood Decision Guide tab and have students select one fish or invertebrate to use in demonstrating how the interactive works. Discuss with them what is meant by the trophic level, sustainability ranking, toxicity level, and omega-3 content. Use the seafood decision guide to research the sustainability of one type of seafood from each of the five major fishing regions. Have student pairs label the location of the fisheries on their maps and fill in the chart with the seafood names and sustainability levels. Examples of seafood by region are listed on the teacher guide. Then have students click on the interactive’s World’s Seafood Footprint tab and record the catch levels and consumption levels for each of the five major fisheries regions. Students should use a scale of low, medium, and high. Move the cursor to compare and contrast levels of catch and consumption between the U.S. and other countries. To help students visualize how fisheries have expanded over the last 60 years, click on the Where Fish Are Caught link located on the lower left corner of the World’s Seafood Footprint page.

4. Have students reflect on what they learned.

On their own paper, have students reflect on what they learned in writing. Ask:

  • How do the locations of the world’s fisheries relate to levels of human population and seafood consumption?
  • Why would raising consumer awareness help to alleviate some of these problems?
  • Do you think you or your family would change your seafood choices if you knew more about these issues?

Discuss student responses as a class and explain that raising consumer awareness would prevent overfishing of marine animals whose populations are not sustainable—like some of the seafood species they just researched. Then show them the other educational resources that are available on the Impacts of Seafood website. Be sure to point out the links to the Additional Seafood Guides and explain that these resources are helping educate people all over the world so that they can make more responsible seafood choices.

Informal Assessment

Use student worksheets and free response answers to assess their comprehension of the issue of overfishing.

Extending the Learning

If possible, have students watch the documentary film The End of the Line: Imagine a World Without Fish.

Stereo Map tab

The Stereo Map tab contains several groups: Clipboard , Navigate , Stereo Source , Layer , Stereo Display , Stereo Model , Cursor Type , Subviews , and Inquiry .

The Clipboard , Navigate , and Layer groups are duplicated from the map view. The Inquiry group contains the Locate and Measure tools. The other groups are unique to the stereo workflow.

Stereo Source group

The Stereo Source group has a split button to set and clear the stereo source. When a stereo map is initiated, you need to identify the data source for the stereo project. The Set Source button allows you to choose which stereo images to use in your project. You can choose a mosaic dataset or an image pair. When the stereo source is loaded, the first stereo pair of the mosaic data is used by default. Once you choose your stereo source, you can use the various stereo tools on the source images and perform your stereo workflow.

A stereo map can only have one stereo source. If the stereo map already has a stereo source defined, the new stereo source will replace the previous stereo source. If the source mosaic dataset does not have a stereo model built, the system gives you a warning message to build a stereo model before it can be used as a stereo source. When you use two images as your stereo source, ArcGIS Pro checks the files for rational polynomial coefficients (RPCs), frame camera models, and overlap between the two images. If any of the necessary requirements are missing, you are notified.

When you are finished using the current stereo source and you want to remove it from the stereo map, use the Clear Source button in the menu below Set Source .

Stereo Display group

The Stereo Display group has tools to set up your selected image pairs for your stereo workflow. The Display Mode has a drop-down menu to choose how to display your stereo pairs. The Default option displays both images. If you only want to see the left or the right image, click the Left Image Only button or the Right Image Only button , respectively. Click None if you do not want to display either of the stereo images.

If your stereo pairs are in the wrong order and you want to swap the left and right images, you can click Invert .

Display Stretch opens the Stereo Model Symbology pane, allowing you to adjust the image display setting for the left and right images. You can adjust the brightness, contrast, and gamma for each image. Additionally, you can adjust symbology settings such as band combination, contrast stretch, and dynamic range adjustment. If the settings for both the left and the right images are the same, you can check the Use same settings for both images check box and then make your display adjustments for both images simultaneously.

Zoom to Stereo Model updates the map display with the chosen stereo pair. This is helpful when you are exploring the map and you want to return focus to the extent of the stereo pairs.

The Resolution drop-down list allows you to set the display scale based on a factor of the current stereo model's resolution. These resolution choices help you work at the same level of detail for all your stereo models.

Stereo Model group

The stereo model collection can include many stereo pairs. The Stereo Model group has the tools to choose the stereo pair you want to work with in the stereo source. The Stereo Model Selector button opens the Stereo Model Selector pane, which allows you to manage and select stereo pairs to work with. The top of this pane displays the footprints of all the stereo pairs in your stereo source. The bottom of the pane lists all the available stereo pairs, which can be filtered by polygon, map extent, or attribute. For more information about the Stereo Model Selector pane, see Stereo Model Selector pane.

The other tools in the Stereo Model group give you different ways to choose which stereo pair to work with. Best Stereo Model displays the most appropriate stereo pair based on your location in the map display and the stereo model metadata. Next Stereo Model displays the next stereo pair in the stereo model based on the current sorting order. Conversely, Previous Stereo Model displays the previous stereo pair in the stereo model based on the current sorting order. Undo Stereo Model goes back to the previous stereo pair that was displayed in the map. Redo Stereo Model shows the next stereo pair that you were working with in the stereo map.

Cursor group

The tools in the Cursor group help you pick the right cursor shape, size, and color for your data. They also allow you to set the cursor z-sensitivity.

Cursor type

  • Box Dot
  • Circle Dot
  • Cross Dot
  • Cross Only
  • Dot
  • X Dot
  • X Only

Each cursor shape has its advantages and disadvantages, but it is mainly a personal preference as to which one to use.

Cursor size and color

You can select the color and size of the cursor to increase its visibility in the stereo view. If you use the cyan/red anaglyph view, some colors show the height of the cursor better than others.

Cursor sensitivity

The cursor sensitivity page allows you to determine how much the z-value changes per scroll of the mouse wheel. The default value is the value set by the system based on data characteristics. It also allows you to set how the accelerator ( Shift key) and decelerator ( Caps Lock key) shortcuts will affect the change in z per scroll.

The application default values for cursor sensitivity are configurable on the Navigation Options page.

Sub Views group

The Overview window shows the zoomed-out location of your current extent. This can help you navigate around the stereo pairs in your project without leaving your current stereo display resolution. The Magnifier window shows a zoomed-in view of the location of your cursor. This can help you view an object closely, without having to leave your current stereo display resolution.

Description of the issue

The issue itself (lag with the mouse) happens whenever the cursor icon changes. For instance, if I keep hovering from and to a textfield (and the cursor changes into a caret and then back to a mouse), it stops for 200 milliseconds while it changes the icon.

An example is if I follow the mouse in the pattern shown by the arrows below. When crossing the window border, the cursor changes into a "resize window" cursor for a short while, making the cursor lag.

This doesn't sound like much, but it happens every time the cursor changes (even if it's to just move the mouse somewhere else, and accidentally make it cross a window border from where the resize cursor shows etc).

What do you suggest I try?

Before you begin

The App Visibility agent for Java requires up to 256 MB of JVM heap = memory. When the agent runs in the same JVM memory space as the monitored a= pplications, BMC recommends adding 256 MB to the Max = heapsize Java options flag -Xmx.

For full details about both the -javaagent and = Xmx options, refer to the Java options documentation for your applic= ation server type.

<AgentInstallationDirectory&g= t ADOPsInstalladops-agent.jar
Where <AgentInstallationDirectory>is the C:= mcappvis_agent directory

    • Linux
      <AgentInstallationDirectory> /ADOPsInstall/adops-agent.jar
      Where &= ltAgentInstallationDirectory>is the /usr/bmc/= appvis_agent directory

    History: How I get to this problem (total about 2 days work)

    Found out that it works with older Win10 versions, so it seems that Microsoft break something:


    Not working

    HeiDoc was quite usefull here, since downloading special versions is a big mess on Microsofts side: The current official Media Creation tool didn't let me choose any parameters about the version. Even when using an older version of the tool itself, it doesn't start and force me to download the latest version.

    I tried installing 1709 on USB stick which works perfectly. Since Win10 has forced updates, I'm surprised if the system is working after installing the latest auto-updates, which bring the system up to 1803.