Extract Floor Plan Features From PDF (Indoors)

Summary

Creates polyline features from a .pdf file.

The output polylines from this tool can be refined with editing tools and used as an input to the Import Features To Indoor Dataset tool to populate an Indoors workspace for use in floor-aware maps and scenes.

Usage

  • This tool accepts a .pdf file as input and creates polylines based on the PDF line work. Use this tool as part of a larger workflow to extract floor plans from PDF files.

  • Refine the output polyline features using editing tools to remove unnecessary lines or vertices, close gaps, or add details not included in the PDF, and use the output as input to the Import Features To Indoor Dataset tool.

  • If the input .pdf file is georeferenced, georeferencing information will be honored. If the input .pdf file is not georeferenced, the resulting polylines will be created in WGS 1984 Web Mercator at the coordinates 0,0.

  • For multipage PDFs, use the Page Number parameter to specify the page to import.

  • The tool creates the following fields in the output:

    • PDF_NAME—The file name of the input .pdf.
    • PDF_NUMBER—The Page Number parameter value.
    • USE_TYPE—The tool identifies door features and populates the USE_TYPE field for them. These features can be closed when creating unit features using the Import Features To Indoor Dataset tool.
  • The Output Line Features parameter value supports creating a new feature class or adding new polyline features to an existing layer. If an existing layer is provided that contains features with PDF_NAME and PDF_NUMBER field values that match the input PDF, those polyline features will be deleted and new polyline features will be added.

  • Output line features are created with a z-value of 0. Set the z-value of the level when running the Import Features To Indoor Dataset tool.

  • Use the Extent parameter to limit the processing extent and to exclude PDF elements such as legends, text boxes, and leader lines.

Parameters

LabelExplanationData Type
Input PDF

The input .pdf file from which polyline features will be extracted.

File
Output Line Features

The output polyline feature layer that extracted polylines will be written to.

Feature Layer
Page Number
(Optional)

The page number of the input .pdf file that will be converted to polyline data. The default is 1.

String
Extent
(Optional)

The extent of the data that will be evaluated.

  • Current Display Extent Map View—The extent will be based on the active map or scene.
  • Draw Extent Square and Finish—The extent will be based on a rectangle drawn on the map or scene.
  • Extent of a Layer Layer—The extent will be based on an active map layer. Choose an available layer or use the Extent of data in all layers option. Each map layer has the following options:

    • All Features Select All—The extent of all features.
    • Selected Features Area from Selected Features—The extent of the selected features.
    • Visible Features Extent Indicator—The extent of visible features.

  • Browse Browse—The extent will be based on a dataset.
  • Intersection of Inputs Intersect—The extent will be the intersecting extent of all inputs.
  • Union of Inputs Union—The extent will be the combined extent of all inputs.
  • Clipboard Paste—The extent can be copied to and from the clipboard.
    • Copy Extent Copy—Copies the extent and coordinate system to the clipboard.
    • Paste Extent Paste—Pastes the extent and coordinate system from the clipboard. If the clipboard does not include a coordinate system, the extent will use the map’s coordinate system.
  • Reset Extent Reset—The extent will be reset to the default value.

When coordinates are manually provided, the coordinates must be numeric values and in the active map's coordinate system. The map may use different display units than the provided coordinates. Use a negative value sign for south and west coordinates.

Extent

arcpy.indoors.ExtractFloorPlanFeaturesFromPDF(in_pdf, out_line_features, {page_number}, {extent})
NameExplanationData Type
in_pdf

The input .pdf file from which polyline features will be extracted.

File
out_line_features

The output polyline feature layer that extracted polylines will be written to.

Feature Layer
page_number
(Optional)

The page number of the input .pdf file that will be converted to polyline data. The default is 1.

String
extent
(Optional)

The extent of the data that will be evaluated.

  • MAXOF—The maximum extent of all inputs will be used.
  • MINOF—The minimum area common to all inputs will be used.
  • DISPLAY—The extent is equal to the visible display.
  • Layer name—The extent of the specified layer will be used.
  • Extent object—The extent of the specified object will be used.
  • Space delimited string of coordinates—The extent of the specified string will be used. Coordinates are expressed in the order of x-min, y-min, x-max, y-max.
Extent

Code sample

ExtractFloorPlanFeaturesFromPDF example 1 (Python window)

The following Python window script demonstrates how to use the ExtractFloorPlanFeaturesFromPDF function in immediate mode.

import arcpy
arcpy.indoors.ExtractFloorPlanFeaturesFromPDF(r"C:\Indoors\PDFs\Floor1-Blueprint.PDF",
                                       r"C:\IndoorsDB\FloorPlanData\Floor1_ExtractedLines", 
                                       "1", 
                                       "-107.0 38.0 -104.0 40.0")
ExtractFloorPlanFeaturesFromPDF example 2 (stand-alone script)

The following stand-alone script demonstrates how to use the ExtractFloorPlanFeaturesFromPDF function.

#Name: Indoors_ExtractFloorPlanFeaturesFromPDF_example2.py
#Description: Extracts polyline floor plan features from an input PDF

import arcpy

# Check Out Extensions
arcpy.CheckOutExtension('Indoors')

# Set Local Variables
in_pdf=r"C:\Indoors\PDFs\Floor1-Blueprint.PDF"
out_line_features=r"C:\IndoorsDB\FloorPlanData\Floor1_ExtractedLines"
page_number="1"
extent="-107.0 38.0 -104.0 40.0"

# Call the function
arcpy.gp.ExtractFloorPlanFeaturesFromPDF(
    in_pdf,
    out_line_features,
    page_number,
    extent
)

# Check In Extensions
arcpy.CheckInExtension('Indoors')

Environments

Licensing information

  • Basic: No
  • Standard: No
  • Advanced: Requires ArcGIS Indoors Pro or ArcGIS Indoors Maps.

Related topics