SlideShare une entreprise Scribd logo
1  sur  15
A TOOL TO PACKAGE THE CONTENT OF A
MAP(.MPK) AND GENERATE ITS REPORT(
.TXT) FORMAT
Project members:
Bibek Karki(13)
Upendra Oli(19)
Uttam Pudasaini(22)
WHAT HAVE WE DONE??
 Developed a script that produces a simple report for the current
map document and provides:
 Information about all data frames and layers in the map
 List all such layers having broken data links
 A map package (*.mpk) for the current mxd document
MOREOVER,
 Assessing user-provided inputs
 Branching and looping statements in python
 Execute a Geoprocessing tool
 Show messages that report the script‟s progress
 Access objects in a map document (Data frames and Layers )
 Create, open, and write reports to text files
OBJECTIVE
 Distributing maps to those who do not normally have access to the
data along with
 Its details(Data provider information, total data frames in the
compressed .mpk document)
ABOUT THE PROGRAM
1. Import modules:
 import os, sys ,arcpy and import arcpy.mapping as mapping
2. Read User Inputs
 Output_Location = arcpy.GetParameterAsText(0)
 Packaged_Map = arcpy.GetParameter(1)
 Information_BrokenLayers = arcpy.GetParameter(2)
CONTD…
3. Obtain map document where the user is currently working using
"Current" keyword
 mxd_current = mapping.MapDocument('Current')
 Required parameter for the MapDocument function is
 “either a path to a map document on disk” or
 The keyword “Current”
4. Write the output text file for our mxd file (text file)
 Output_Path = Output_Location + '' +"Metadata For" +mxd.title
+ '.txt'
5. Open the file ,The file will be created if it doesn't exist.
 Output_File = open(Output_Path, 'w')
CONTD…
6. Include the details to be included to provide information about the
mxd producer
 Details = 'Title: ' + mxd.title + 'n'
 Details += 'Author: ' + mxd.author + 'n'
 Details += 'Description: ' + mxd.description + 'n„
7. User will have two options to check once the tool runs
 For creating package Map
 For generating the output report of current mxd document
8. Creating packacgemap
 Use ArcPy to call the PackageMap geoprocessing tool.
package_map_Path = outDir + '' + mxd.title.replace('.', '_') +
'.mpk
if (os.path.exists(package_map_Path)):
arcpy.AddMessage('Map package already exists (' +
package_map_Path+ ')')
else:
arcpy.AddMessage('Creating map package (' +
package_map_Path + ')'
arcpy.PackageMap_management(mxd.filePath,
package_map_Path)
Note: PackageMap_management requires the path to the map
document and the path to the output package file
9. Acquire all data frames (Data frame name and spatail Reference)
in this map document
DataFrames = mapping.ListDataFrames(mxd, '')
for frame in DataFrames:
Details += 'nData Frame: ' + frame.name + 'n'
Details += 'Spatial Reference: ' + frame.spatialReference.name + 'n'
# Obtain all layers in this data frame
layers = mapping.ListLayers(mxd, '', frame)
i = 0 # layer index position
# Loop through all layers in the data frame
for lyr in layers:
# Report index position and name
Details += 'tLayer ' + str(i) + ': ' + lyr.name + 'n'
i += 1
10. To check for layers with a missing data source
if checkBrokenLayers:
arcpy.AddMessage('Checking for missing data sources')
brokenList = mapping.ListBrokenDataSources(mxd)
# Get the count of broken layers
Details += 'nFound ' + str(len(brokenList)) + ' layers with missing
data.'
# Loop through all broken layers in the list
for broken in brokenList:
# report broken layer name
Details += 't- ' + broken.name + 'n'
11. Write the text stored in the Details variable to the output file
 reportFile.write(Details)
 reportFile.close()
 del mxd # delete the mxd object
BEFORE YOU RUN THIS SCRIPT
 Be sure to enter descriptive information about the mxd file
it in the Map Document Properties dialog box.
 To let others know the basic description of your map documents
 You can access this dialog box by clicking File > Map
Document Properties on the main menu.
SCRIPT PARAMETERS
Reading Inputs Parameter
Name
Data Type Default Value
GetParameterAsText(0) Output
location
Folder Optional
GetParameter(2) Package
Map
Boolean False
GetParameter(3) Broken link
check
Boolean True
Its because parameter values are read from an ordered list of inputs…
OUTPUT
 Package map:
 Packages a map document and all referenced data sources to
create a single compressed .mpk file.
 Report file:
 Metadata information about the mxd documents and its all data
frames
*THANK YOU
DEMO OF PRODUCT
Contact: utmpudasaini@gmail.com

Contenu connexe

En vedette

TWO MOST COMMON GEOGRAPHIC INFORMATION SERVICE STANDARDS 19116:2004 AND ISO ...
TWO MOST COMMON GEOGRAPHIC INFORMATION SERVICE STANDARDS 19116:2004 AND  ISO ...TWO MOST COMMON GEOGRAPHIC INFORMATION SERVICE STANDARDS 19116:2004 AND  ISO ...
TWO MOST COMMON GEOGRAPHIC INFORMATION SERVICE STANDARDS 19116:2004 AND ISO ...Nepal Flying Labs
 
3D MODELLING OF KATHMANDU UNIVERSITY
3D MODELLING OF KATHMANDU UNIVERSITY3D MODELLING OF KATHMANDU UNIVERSITY
3D MODELLING OF KATHMANDU UNIVERSITYNepal Flying Labs
 
Geoprocessing(Building Your Own Tool) and Geostatistical Analysis(An Introdu...
Geoprocessing(Building Your Own Tool)  and Geostatistical Analysis(An Introdu...Geoprocessing(Building Your Own Tool)  and Geostatistical Analysis(An Introdu...
Geoprocessing(Building Your Own Tool) and Geostatistical Analysis(An Introdu...Nepal Flying Labs
 
Poster Presentation "Generation of High Resolution DSM Usin UAV Images"
Poster Presentation "Generation of High Resolution DSM Usin UAV Images"Poster Presentation "Generation of High Resolution DSM Usin UAV Images"
Poster Presentation "Generation of High Resolution DSM Usin UAV Images"Nepal Flying Labs
 
FROM BIG BANG TO THE PRESENT TIME
FROM BIG BANG TO THE PRESENT TIMEFROM BIG BANG TO THE PRESENT TIME
FROM BIG BANG TO THE PRESENT TIMENepal Flying Labs
 
MODIS (Moderate Resolution Imaging Spectrometer)
MODIS (Moderate Resolution Imaging Spectrometer)MODIS (Moderate Resolution Imaging Spectrometer)
MODIS (Moderate Resolution Imaging Spectrometer)Nepal Flying Labs
 
MEASUREMENT OF SURFACE TEMPERATURE OF A GLACIER USING AN UNMANNED AERIAL VEHI...
MEASUREMENT OF SURFACE TEMPERATURE OF A GLACIER USING AN UNMANNED AERIAL VEHI...MEASUREMENT OF SURFACE TEMPERATURE OF A GLACIER USING AN UNMANNED AERIAL VEHI...
MEASUREMENT OF SURFACE TEMPERATURE OF A GLACIER USING AN UNMANNED AERIAL VEHI...Nepal Flying Labs
 
Survey and Design of Gravity Fed Water supply system at a DadaGaun ,Banepa
Survey and Design of Gravity Fed Water supply system at a DadaGaun ,BanepaSurvey and Design of Gravity Fed Water supply system at a DadaGaun ,Banepa
Survey and Design of Gravity Fed Water supply system at a DadaGaun ,BanepaNepal Flying Labs
 
Usages and Challenges of using DRONES in Reconstruction Efforts of NEPAL
Usages and Challenges of using DRONES  in Reconstruction Efforts of NEPALUsages and Challenges of using DRONES  in Reconstruction Efforts of NEPAL
Usages and Challenges of using DRONES in Reconstruction Efforts of NEPALNepal Flying Labs
 
WHAT'S THERE IN GEOMATICS ENGINEERING???
WHAT'S THERE IN GEOMATICS ENGINEERING???WHAT'S THERE IN GEOMATICS ENGINEERING???
WHAT'S THERE IN GEOMATICS ENGINEERING???Nepal Flying Labs
 
Introduction to Geomatics _2014
Introduction to Geomatics _2014Introduction to Geomatics _2014
Introduction to Geomatics _2014Atiqa khan
 
Analysis of suggested Sites for Construction of a Shopping Mall at Banepa,Kavre
Analysis of suggested Sites for Construction of a Shopping Mall at Banepa,KavreAnalysis of suggested Sites for Construction of a Shopping Mall at Banepa,Kavre
Analysis of suggested Sites for Construction of a Shopping Mall at Banepa,KavreNepal Flying Labs
 
Generation of high resolution DSM using UAV Images
Generation of high resolution DSM using UAV Images  Generation of high resolution DSM using UAV Images
Generation of high resolution DSM using UAV Images Nepal Flying Labs
 

En vedette (14)

TWO MOST COMMON GEOGRAPHIC INFORMATION SERVICE STANDARDS 19116:2004 AND ISO ...
TWO MOST COMMON GEOGRAPHIC INFORMATION SERVICE STANDARDS 19116:2004 AND  ISO ...TWO MOST COMMON GEOGRAPHIC INFORMATION SERVICE STANDARDS 19116:2004 AND  ISO ...
TWO MOST COMMON GEOGRAPHIC INFORMATION SERVICE STANDARDS 19116:2004 AND ISO ...
 
3D MODELLING OF KATHMANDU UNIVERSITY
3D MODELLING OF KATHMANDU UNIVERSITY3D MODELLING OF KATHMANDU UNIVERSITY
3D MODELLING OF KATHMANDU UNIVERSITY
 
Geomatics for Disaster Management and Survey
Geomatics for Disaster Management and SurveyGeomatics for Disaster Management and Survey
Geomatics for Disaster Management and Survey
 
Geoprocessing(Building Your Own Tool) and Geostatistical Analysis(An Introdu...
Geoprocessing(Building Your Own Tool)  and Geostatistical Analysis(An Introdu...Geoprocessing(Building Your Own Tool)  and Geostatistical Analysis(An Introdu...
Geoprocessing(Building Your Own Tool) and Geostatistical Analysis(An Introdu...
 
Poster Presentation "Generation of High Resolution DSM Usin UAV Images"
Poster Presentation "Generation of High Resolution DSM Usin UAV Images"Poster Presentation "Generation of High Resolution DSM Usin UAV Images"
Poster Presentation "Generation of High Resolution DSM Usin UAV Images"
 
FROM BIG BANG TO THE PRESENT TIME
FROM BIG BANG TO THE PRESENT TIMEFROM BIG BANG TO THE PRESENT TIME
FROM BIG BANG TO THE PRESENT TIME
 
MODIS (Moderate Resolution Imaging Spectrometer)
MODIS (Moderate Resolution Imaging Spectrometer)MODIS (Moderate Resolution Imaging Spectrometer)
MODIS (Moderate Resolution Imaging Spectrometer)
 
MEASUREMENT OF SURFACE TEMPERATURE OF A GLACIER USING AN UNMANNED AERIAL VEHI...
MEASUREMENT OF SURFACE TEMPERATURE OF A GLACIER USING AN UNMANNED AERIAL VEHI...MEASUREMENT OF SURFACE TEMPERATURE OF A GLACIER USING AN UNMANNED AERIAL VEHI...
MEASUREMENT OF SURFACE TEMPERATURE OF A GLACIER USING AN UNMANNED AERIAL VEHI...
 
Survey and Design of Gravity Fed Water supply system at a DadaGaun ,Banepa
Survey and Design of Gravity Fed Water supply system at a DadaGaun ,BanepaSurvey and Design of Gravity Fed Water supply system at a DadaGaun ,Banepa
Survey and Design of Gravity Fed Water supply system at a DadaGaun ,Banepa
 
Usages and Challenges of using DRONES in Reconstruction Efforts of NEPAL
Usages and Challenges of using DRONES  in Reconstruction Efforts of NEPALUsages and Challenges of using DRONES  in Reconstruction Efforts of NEPAL
Usages and Challenges of using DRONES in Reconstruction Efforts of NEPAL
 
WHAT'S THERE IN GEOMATICS ENGINEERING???
WHAT'S THERE IN GEOMATICS ENGINEERING???WHAT'S THERE IN GEOMATICS ENGINEERING???
WHAT'S THERE IN GEOMATICS ENGINEERING???
 
Introduction to Geomatics _2014
Introduction to Geomatics _2014Introduction to Geomatics _2014
Introduction to Geomatics _2014
 
Analysis of suggested Sites for Construction of a Shopping Mall at Banepa,Kavre
Analysis of suggested Sites for Construction of a Shopping Mall at Banepa,KavreAnalysis of suggested Sites for Construction of a Shopping Mall at Banepa,Kavre
Analysis of suggested Sites for Construction of a Shopping Mall at Banepa,Kavre
 
Generation of high resolution DSM using UAV Images
Generation of high resolution DSM using UAV Images  Generation of high resolution DSM using UAV Images
Generation of high resolution DSM using UAV Images
 

Similaire à Using arc map to create package map along with a report file [metadata]

Transformations and actions a visual guide training
Transformations and actions a visual guide trainingTransformations and actions a visual guide training
Transformations and actions a visual guide trainingSpark Summit
 
Introduction to r studio on aws 2020 05_06
Introduction to r studio on aws 2020 05_06Introduction to r studio on aws 2020 05_06
Introduction to r studio on aws 2020 05_06Barry DeCicco
 
containerit at useR!2017 conference, Brussels
containerit at useR!2017 conference, Brusselscontainerit at useR!2017 conference, Brussels
containerit at useR!2017 conference, BrusselsDaniel Nüst
 
03 Geographic scripting in uDig - halfway between user and developer
03 Geographic scripting in uDig - halfway between user and developer03 Geographic scripting in uDig - halfway between user and developer
03 Geographic scripting in uDig - halfway between user and developerAndrea Antonello
 
Computer Science Sample Paper 2
Computer Science Sample Paper 2Computer Science Sample Paper 2
Computer Science Sample Paper 2kvs
 
Basics of MATLAB programming
Basics of MATLAB programmingBasics of MATLAB programming
Basics of MATLAB programmingRanjan Pal
 
Object oriented programming using c++
Object oriented programming using c++Object oriented programming using c++
Object oriented programming using c++Hoang Nguyen
 
R Spatial Analysis using SP
R Spatial Analysis using SPR Spatial Analysis using SP
R Spatial Analysis using SPtjagger
 
CountryData.cppEDIT THIS ONE#include fstream #include str.pdf
CountryData.cppEDIT THIS ONE#include fstream #include str.pdfCountryData.cppEDIT THIS ONE#include fstream #include str.pdf
CountryData.cppEDIT THIS ONE#include fstream #include str.pdfAggarwalelectronic18
 
2017 02-07 - elastic & spark. building a search geo locator
2017 02-07 - elastic & spark. building a search geo locator2017 02-07 - elastic & spark. building a search geo locator
2017 02-07 - elastic & spark. building a search geo locatorAlberto Paro
 
2017 02-07 - elastic & spark. building a search geo locator
2017 02-07 - elastic & spark. building a search geo locator2017 02-07 - elastic & spark. building a search geo locator
2017 02-07 - elastic & spark. building a search geo locatorAlberto Paro
 
Introduction to matlab lecture 4 of 4
Introduction to matlab lecture 4 of 4Introduction to matlab lecture 4 of 4
Introduction to matlab lecture 4 of 4Randa Elanwar
 
Advanced spark training advanced spark internals and tuning reynold xin
Advanced spark training advanced spark internals and tuning reynold xinAdvanced spark training advanced spark internals and tuning reynold xin
Advanced spark training advanced spark internals and tuning reynold xincaidezhi655
 
The Functional Programming Triad of Map, Filter and Fold
The Functional Programming Triad of Map, Filter and FoldThe Functional Programming Triad of Map, Filter and Fold
The Functional Programming Triad of Map, Filter and FoldPhilip Schwarz
 
Go Programming Patterns
Go Programming PatternsGo Programming Patterns
Go Programming PatternsHao Chen
 
8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...
8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...
8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...Yashpatel821746
 

Similaire à Using arc map to create package map along with a report file [metadata] (20)

Transformations and actions a visual guide training
Transformations and actions a visual guide trainingTransformations and actions a visual guide training
Transformations and actions a visual guide training
 
Introduction to r studio on aws 2020 05_06
Introduction to r studio on aws 2020 05_06Introduction to r studio on aws 2020 05_06
Introduction to r studio on aws 2020 05_06
 
containerit at useR!2017 conference, Brussels
containerit at useR!2017 conference, Brusselscontainerit at useR!2017 conference, Brussels
containerit at useR!2017 conference, Brussels
 
R Introduction
R IntroductionR Introduction
R Introduction
 
SAADATMAND_PYTHON
SAADATMAND_PYTHONSAADATMAND_PYTHON
SAADATMAND_PYTHON
 
03 Geographic scripting in uDig - halfway between user and developer
03 Geographic scripting in uDig - halfway between user and developer03 Geographic scripting in uDig - halfway between user and developer
03 Geographic scripting in uDig - halfway between user and developer
 
Computer Science Sample Paper 2
Computer Science Sample Paper 2Computer Science Sample Paper 2
Computer Science Sample Paper 2
 
Basics of MATLAB programming
Basics of MATLAB programmingBasics of MATLAB programming
Basics of MATLAB programming
 
Object oriented programming using c++
Object oriented programming using c++Object oriented programming using c++
Object oriented programming using c++
 
R Spatial Analysis using SP
R Spatial Analysis using SPR Spatial Analysis using SP
R Spatial Analysis using SP
 
CountryData.cppEDIT THIS ONE#include fstream #include str.pdf
CountryData.cppEDIT THIS ONE#include fstream #include str.pdfCountryData.cppEDIT THIS ONE#include fstream #include str.pdf
CountryData.cppEDIT THIS ONE#include fstream #include str.pdf
 
2017 02-07 - elastic & spark. building a search geo locator
2017 02-07 - elastic & spark. building a search geo locator2017 02-07 - elastic & spark. building a search geo locator
2017 02-07 - elastic & spark. building a search geo locator
 
2017 02-07 - elastic & spark. building a search geo locator
2017 02-07 - elastic & spark. building a search geo locator2017 02-07 - elastic & spark. building a search geo locator
2017 02-07 - elastic & spark. building a search geo locator
 
CONNECTING BENTLEY AND ESRI TERRAIN DATA
CONNECTING BENTLEY AND ESRI TERRAIN DATA CONNECTING BENTLEY AND ESRI TERRAIN DATA
CONNECTING BENTLEY AND ESRI TERRAIN DATA
 
Introduction to matlab lecture 4 of 4
Introduction to matlab lecture 4 of 4Introduction to matlab lecture 4 of 4
Introduction to matlab lecture 4 of 4
 
Advanced spark training advanced spark internals and tuning reynold xin
Advanced spark training advanced spark internals and tuning reynold xinAdvanced spark training advanced spark internals and tuning reynold xin
Advanced spark training advanced spark internals and tuning reynold xin
 
10. R getting spatial
10.  R getting spatial10.  R getting spatial
10. R getting spatial
 
The Functional Programming Triad of Map, Filter and Fold
The Functional Programming Triad of Map, Filter and FoldThe Functional Programming Triad of Map, Filter and Fold
The Functional Programming Triad of Map, Filter and Fold
 
Go Programming Patterns
Go Programming PatternsGo Programming Patterns
Go Programming Patterns
 
8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...
8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...
8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...
 

Dernier

Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 

Dernier (20)

Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 

Using arc map to create package map along with a report file [metadata]

  • 1. A TOOL TO PACKAGE THE CONTENT OF A MAP(.MPK) AND GENERATE ITS REPORT( .TXT) FORMAT Project members: Bibek Karki(13) Upendra Oli(19) Uttam Pudasaini(22)
  • 2. WHAT HAVE WE DONE??  Developed a script that produces a simple report for the current map document and provides:  Information about all data frames and layers in the map  List all such layers having broken data links  A map package (*.mpk) for the current mxd document
  • 3. MOREOVER,  Assessing user-provided inputs  Branching and looping statements in python  Execute a Geoprocessing tool  Show messages that report the script‟s progress  Access objects in a map document (Data frames and Layers )  Create, open, and write reports to text files
  • 4. OBJECTIVE  Distributing maps to those who do not normally have access to the data along with  Its details(Data provider information, total data frames in the compressed .mpk document)
  • 5. ABOUT THE PROGRAM 1. Import modules:  import os, sys ,arcpy and import arcpy.mapping as mapping 2. Read User Inputs  Output_Location = arcpy.GetParameterAsText(0)  Packaged_Map = arcpy.GetParameter(1)  Information_BrokenLayers = arcpy.GetParameter(2)
  • 6. CONTD… 3. Obtain map document where the user is currently working using "Current" keyword  mxd_current = mapping.MapDocument('Current')  Required parameter for the MapDocument function is  “either a path to a map document on disk” or  The keyword “Current” 4. Write the output text file for our mxd file (text file)  Output_Path = Output_Location + '' +"Metadata For" +mxd.title + '.txt' 5. Open the file ,The file will be created if it doesn't exist.  Output_File = open(Output_Path, 'w')
  • 7. CONTD… 6. Include the details to be included to provide information about the mxd producer  Details = 'Title: ' + mxd.title + 'n'  Details += 'Author: ' + mxd.author + 'n'  Details += 'Description: ' + mxd.description + 'n„ 7. User will have two options to check once the tool runs  For creating package Map  For generating the output report of current mxd document
  • 8. 8. Creating packacgemap  Use ArcPy to call the PackageMap geoprocessing tool. package_map_Path = outDir + '' + mxd.title.replace('.', '_') + '.mpk if (os.path.exists(package_map_Path)): arcpy.AddMessage('Map package already exists (' + package_map_Path+ ')') else: arcpy.AddMessage('Creating map package (' + package_map_Path + ')' arcpy.PackageMap_management(mxd.filePath, package_map_Path) Note: PackageMap_management requires the path to the map document and the path to the output package file
  • 9. 9. Acquire all data frames (Data frame name and spatail Reference) in this map document DataFrames = mapping.ListDataFrames(mxd, '') for frame in DataFrames: Details += 'nData Frame: ' + frame.name + 'n' Details += 'Spatial Reference: ' + frame.spatialReference.name + 'n' # Obtain all layers in this data frame layers = mapping.ListLayers(mxd, '', frame) i = 0 # layer index position # Loop through all layers in the data frame for lyr in layers: # Report index position and name Details += 'tLayer ' + str(i) + ': ' + lyr.name + 'n' i += 1
  • 10. 10. To check for layers with a missing data source if checkBrokenLayers: arcpy.AddMessage('Checking for missing data sources') brokenList = mapping.ListBrokenDataSources(mxd) # Get the count of broken layers Details += 'nFound ' + str(len(brokenList)) + ' layers with missing data.' # Loop through all broken layers in the list for broken in brokenList: # report broken layer name Details += 't- ' + broken.name + 'n'
  • 11. 11. Write the text stored in the Details variable to the output file  reportFile.write(Details)  reportFile.close()  del mxd # delete the mxd object
  • 12. BEFORE YOU RUN THIS SCRIPT  Be sure to enter descriptive information about the mxd file it in the Map Document Properties dialog box.  To let others know the basic description of your map documents  You can access this dialog box by clicking File > Map Document Properties on the main menu.
  • 13. SCRIPT PARAMETERS Reading Inputs Parameter Name Data Type Default Value GetParameterAsText(0) Output location Folder Optional GetParameter(2) Package Map Boolean False GetParameter(3) Broken link check Boolean True Its because parameter values are read from an ordered list of inputs…
  • 14. OUTPUT  Package map:  Packages a map document and all referenced data sources to create a single compressed .mpk file.  Report file:  Metadata information about the mxd documents and its all data frames
  • 15. *THANK YOU DEMO OF PRODUCT Contact: utmpudasaini@gmail.com