Skip to main content

ArcGIS API for Python with Reality Server

ArcGIS API for Python provides realitymapping module for automating reality mapping tasks in the server environment. Using this module, reality mapping workflows including creating projects and missions, running block adjustment, and generating products can be run from a Python script, ArcGIS Notebooks, or Jupyter Notebook.

Note:

To use ArcGIS API for Python with Reality Server, you need an ArcGIS Enterprise portal federated with a Reality Server site. ArcGIS API for Python version 2.4.4 is recommended for ArcGIS Enterprise 12.2.

Use ArcGIS API for Python when you want to do the following:

  • Process many image collections with the same settings.

  • Schedule or repeat processing as new imagery arrives.

  • Integrate reality mapping with other Python-based data preparation or analysis steps.

  • Record a processing workflow as a reusable, shareable notebook.

Sample codes

The following example shows the main steps of a drone imagery workflow. For complete, runnable examples, see the sample notebooks.

  1. Connect to the Portal and confirm that reality mapping is supported.

    from arcgis.gis import GIS
    from arcgis.raster import realitymapping
    
    gis = GIS("https://yourportal.domain.com/portal/", "username", "password")
    realitymapping.is_supported(gis)
    
  2. Create a project.

    project = realitymapping.Project("<project_name>")
    
  3. Define the image source and create a mission.

    uav_src = realitymapping.ImageSource("UAV/UAS")
    uav_src.input_data = r"<input_images_path>"
    mission = project.create_mission(image_sources=uav_src)
    
  4. Run the block adjustment and review adjustment accuracy.

    mission.compute_sensor_model()
    mission.generate_report()
    
  5. Generate products.

    prd_2d = mission.reconstruct_surface(output_products= ["dsm", "true_ortho"])
    

Sample notebooks

The following are sample notebooks for different sensor workflows: