| Label | Explanation | Data 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.
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 |
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
arcpy.indoors.ExtractFloorPlanFeaturesFromPDF(in_pdf, out_line_features, {page_number}, {extent})| Name | Explanation | Data 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.
| Extent |
Code sample
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")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.
—The extent will be based on the active map or scene.
—The extent will be based on a rectangle drawn on the map or scene.
—The extent will be based on an active map layer. Choose an available layer or use the
—The extent of all features.
—The extent of the selected features.
—The extent of visible features.
—The extent will be based on a dataset.
—The extent will be the intersecting extent of all inputs.
—The extent will be the combined extent of all inputs.
—The extent can be copied to and from the clipboard.
—Copies the extent and coordinate
system to the clipboard.
—The extent will be reset to the default value.