CINXE.COM
mappyfile - OSGeo
<!DOCTYPE html> <html class="no-js" lang="en-US"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>mappyfile - OSGeo</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://openlayers.org/en/v5.3.0/css/ol.css" type="text/css"> <!-- The line below is only needed for old environments like Internet Explorer and Android 4.x --> <script src="https://openlayers.org/en/v5.3.0/build/ol.js"></script> <script src="https://www.osgeo.org/wp-content/themes/roots/assets/js/maps/olms.js"></script> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5409a75e4d21936e"></script> <meta name='robots' content='index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1' /> <style>img:is([sizes="auto" i], [sizes^="auto," i]) { contain-intrinsic-size: 3000px 1500px }</style> <!-- This site is optimized with the Yoast SEO plugin v24.1 - https://yoast.com/wordpress/plugins/seo/ --> <meta name="description" content="A Python library to create, parse, modify, and format MapServer Mapfiles." /> <link rel="canonical" href="https://www.osgeo.org/projects/mappyfile/" /> <meta property="og:locale" content="en_US" /> <meta property="og:type" content="article" /> <meta property="og:title" content="mappyfile - OSGeo" /> <meta property="og:description" content="A Python library to create, parse, modify, and format MapServer Mapfiles." /> <meta property="og:url" content="https://www.osgeo.org/projects/mappyfile/" /> <meta property="og:site_name" content="OSGeo" /> <meta property="article:publisher" content="https://www.facebook.com/pages/Open-Source-Geospatial-Foundation/106156432749453?fref=ts&amp%3bamp%3bamp%3bamp%3brf=110150809007713" /> <meta property="article:modified_time" content="2023-09-28T10:11:51+00:00" /> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:site" content="@osgeo" /> <script type="application/ld+json" class="yoast-schema-graph">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://www.osgeo.org/projects/mappyfile/","url":"https://www.osgeo.org/projects/mappyfile/","name":"mappyfile - OSGeo","isPartOf":{"@id":"https://www.osgeo.org/#website"},"datePublished":"2023-07-26T23:54:43+00:00","dateModified":"2023-09-28T10:11:51+00:00","description":"A Python library to create, parse, modify, and format MapServer Mapfiles.","breadcrumb":{"@id":"https://www.osgeo.org/projects/mappyfile/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https://www.osgeo.org/projects/mappyfile/"]}]},{"@type":"BreadcrumbList","@id":"https://www.osgeo.org/projects/mappyfile/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://www.osgeo.org/"},{"@type":"ListItem","position":2,"name":"Projects","item":"https://www.osgeo.org/projects/"},{"@type":"ListItem","position":3,"name":"mappyfile"}]},{"@type":"WebSite","@id":"https://www.osgeo.org/#website","url":"https://www.osgeo.org/","name":"OSGeo","description":"Your Open Source Compass","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://www.osgeo.org/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}</script> <!-- / Yoast SEO plugin. --> <link rel='dns-prefetch' href='//ajax.googleapis.com' /> <script type="text/javascript"> /* <![CDATA[ */ window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/15.0.3\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/15.0.3\/svg\/","svgExt":".svg","source":{"concatemoji":"\/wp-includes\/js\/wp-emoji-release.min.js?ver=6.7.1"}}; /*! This file is auto-generated */ !function(i,n){var o,s,e;function c(e){try{var t={supportTests:e,timestamp:(new Date).valueOf()};sessionStorage.setItem(o,JSON.stringify(t))}catch(e){}}function p(e,t,n){e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(t,0,0);var t=new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data),r=(e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(n,0,0),new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data));return t.every(function(e,t){return e===r[t]})}function u(e,t,n){switch(t){case"flag":return n(e,"\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f","\ud83c\udff3\ufe0f\u200b\u26a7\ufe0f")?!1:!n(e,"\ud83c\uddfa\ud83c\uddf3","\ud83c\uddfa\u200b\ud83c\uddf3")&&!n(e,"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f","\ud83c\udff4\u200b\udb40\udc67\u200b\udb40\udc62\u200b\udb40\udc65\u200b\udb40\udc6e\u200b\udb40\udc67\u200b\udb40\udc7f");case"emoji":return!n(e,"\ud83d\udc26\u200d\u2b1b","\ud83d\udc26\u200b\u2b1b")}return!1}function f(e,t,n){var r="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?new OffscreenCanvas(300,150):i.createElement("canvas"),a=r.getContext("2d",{willReadFrequently:!0}),o=(a.textBaseline="top",a.font="600 32px Arial",{});return e.forEach(function(e){o[e]=t(a,e,n)}),o}function t(e){var t=i.createElement("script");t.src=e,t.defer=!0,i.head.appendChild(t)}"undefined"!=typeof Promise&&(o="wpEmojiSettingsSupports",s=["flag","emoji"],n.supports={everything:!0,everythingExceptFlag:!0},e=new Promise(function(e){i.addEventListener("DOMContentLoaded",e,{once:!0})}),new Promise(function(t){var n=function(){try{var e=JSON.parse(sessionStorage.getItem(o));if("object"==typeof e&&"number"==typeof e.timestamp&&(new Date).valueOf()<e.timestamp+604800&&"object"==typeof e.supportTests)return e.supportTests}catch(e){}return null}();if(!n){if("undefined"!=typeof Worker&&"undefined"!=typeof OffscreenCanvas&&"undefined"!=typeof URL&&URL.createObjectURL&&"undefined"!=typeof Blob)try{var e="postMessage("+f.toString()+"("+[JSON.stringify(s),u.toString(),p.toString()].join(",")+"));",r=new Blob([e],{type:"text/javascript"}),a=new Worker(URL.createObjectURL(r),{name:"wpTestEmojiSupports"});return void(a.onmessage=function(e){c(n=e.data),a.terminate(),t(n)})}catch(e){}c(n=f(s,u,p))}t(n)}).then(function(e){for(var t in e)n.supports[t]=e[t],n.supports.everything=n.supports.everything&&n.supports[t],"flag"!==t&&(n.supports.everythingExceptFlag=n.supports.everythingExceptFlag&&n.supports[t]);n.supports.everythingExceptFlag=n.supports.everythingExceptFlag&&!n.supports.flag,n.DOMReady=!1,n.readyCallback=function(){n.DOMReady=!0}}).then(function(){return e}).then(function(){var e;n.supports.everything||(n.readyCallback(),(e=n.source||{}).concatemoji?t(e.concatemoji):e.wpemoji&&e.twemoji&&(t(e.twemoji),t(e.wpemoji)))}))}((window,document),window._wpemojiSettings); /* ]]> */ </script> <style id='wp-emoji-styles-inline-css' type='text/css'> img.wp-smiley, img.emoji { display: inline !important; border: none !important; box-shadow: none !important; height: 1em !important; width: 1em !important; margin: 0 0.07em !important; vertical-align: -0.1em !important; background: none !important; padding: 0 !important; } </style> <link rel="stylesheet" href="/wp-includes/css/dist/block-library/style.min.css?ver=6.7.1' type='text/css"> <style id='classic-theme-styles-inline-css' type='text/css'> /*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} </style> <style id='global-styles-inline-css' type='text/css'> :root{--wp--preset--aspect-ratio--square: 1;--wp--preset--aspect-ratio--4-3: 4/3;--wp--preset--aspect-ratio--3-4: 3/4;--wp--preset--aspect-ratio--3-2: 3/2;--wp--preset--aspect-ratio--2-3: 2/3;--wp--preset--aspect-ratio--16-9: 16/9;--wp--preset--aspect-ratio--9-16: 9/16;--wp--preset--color--black: #000000;--wp--preset--color--cyan-bluish-gray: #abb8c3;--wp--preset--color--white: #ffffff;--wp--preset--color--pale-pink: #f78da7;--wp--preset--color--vivid-red: #cf2e2e;--wp--preset--color--luminous-vivid-orange: #ff6900;--wp--preset--color--luminous-vivid-amber: #fcb900;--wp--preset--color--light-green-cyan: #7bdcb5;--wp--preset--color--vivid-green-cyan: #00d084;--wp--preset--color--pale-cyan-blue: #8ed1fc;--wp--preset--color--vivid-cyan-blue: #0693e3;--wp--preset--color--vivid-purple: #9b51e0;--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%);--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%);--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%);--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%);--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%);--wp--preset--gradient--cool-to-warm-spectrum: linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%);--wp--preset--gradient--blush-light-purple: linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%);--wp--preset--gradient--blush-bordeaux: linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%);--wp--preset--gradient--luminous-dusk: linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%);--wp--preset--gradient--pale-ocean: linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%);--wp--preset--gradient--electric-grass: linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%);--wp--preset--gradient--midnight: linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%);--wp--preset--font-size--small: 13px;--wp--preset--font-size--medium: 20px;--wp--preset--font-size--large: 36px;--wp--preset--font-size--x-large: 42px;--wp--preset--spacing--20: 0.44rem;--wp--preset--spacing--30: 0.67rem;--wp--preset--spacing--40: 1rem;--wp--preset--spacing--50: 1.5rem;--wp--preset--spacing--60: 2.25rem;--wp--preset--spacing--70: 3.38rem;--wp--preset--spacing--80: 5.06rem;--wp--preset--shadow--natural: 6px 6px 9px rgba(0, 0, 0, 0.2);--wp--preset--shadow--deep: 12px 12px 50px rgba(0, 0, 0, 0.4);--wp--preset--shadow--sharp: 6px 6px 0px rgba(0, 0, 0, 0.2);--wp--preset--shadow--outlined: 6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1);--wp--preset--shadow--crisp: 6px 6px 0px rgba(0, 0, 0, 1);}:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flex{display: flex;}.is-layout-flex{flex-wrap: wrap;align-items: center;}.is-layout-flex > :is(*, div){margin: 0;}body .is-layout-grid{display: grid;}.is-layout-grid > :is(*, div){margin: 0;}:where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;}:where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;}.has-black-color{color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-color{color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-color{color: var(--wp--preset--color--white) !important;}.has-pale-pink-color{color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-color{color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-color{color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-color{color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-color{color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-color{color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-color{color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-color{color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-color{color: var(--wp--preset--color--vivid-purple) !important;}.has-black-background-color{background-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-background-color{background-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-background-color{background-color: var(--wp--preset--color--white) !important;}.has-pale-pink-background-color{background-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-background-color{background-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-background-color{background-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-background-color{background-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-background-color{background-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-background-color{background-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-background-color{background-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-background-color{background-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-background-color{background-color: var(--wp--preset--color--vivid-purple) !important;}.has-black-border-color{border-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-border-color{border-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-border-color{border-color: var(--wp--preset--color--white) !important;}.has-pale-pink-border-color{border-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-border-color{border-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-border-color{border-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-border-color{border-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-border-color{border-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-border-color{border-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-border-color{border-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-border-color{border-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-border-color{border-color: var(--wp--preset--color--vivid-purple) !important;}.has-vivid-cyan-blue-to-vivid-purple-gradient-background{background: var(--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple) !important;}.has-light-green-cyan-to-vivid-green-cyan-gradient-background{background: var(--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan) !important;}.has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange) !important;}.has-luminous-vivid-orange-to-vivid-red-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-orange-to-vivid-red) !important;}.has-very-light-gray-to-cyan-bluish-gray-gradient-background{background: var(--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray) !important;}.has-cool-to-warm-spectrum-gradient-background{background: var(--wp--preset--gradient--cool-to-warm-spectrum) !important;}.has-blush-light-purple-gradient-background{background: var(--wp--preset--gradient--blush-light-purple) !important;}.has-blush-bordeaux-gradient-background{background: var(--wp--preset--gradient--blush-bordeaux) !important;}.has-luminous-dusk-gradient-background{background: var(--wp--preset--gradient--luminous-dusk) !important;}.has-pale-ocean-gradient-background{background: var(--wp--preset--gradient--pale-ocean) !important;}.has-electric-grass-gradient-background{background: var(--wp--preset--gradient--electric-grass) !important;}.has-midnight-gradient-background{background: var(--wp--preset--gradient--midnight) !important;}.has-small-font-size{font-size: var(--wp--preset--font-size--small) !important;}.has-medium-font-size{font-size: var(--wp--preset--font-size--medium) !important;}.has-large-font-size{font-size: var(--wp--preset--font-size--large) !important;}.has-x-large-font-size{font-size: var(--wp--preset--font-size--x-large) !important;} :where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;} :where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;} :root :where(.wp-block-pullquote){font-size: 1.5em;line-height: 1.6;} </style> <link rel="stylesheet" href="/wp-content/themes/roots/assets/css/main.min.css?ver=203d662ed73a734614f82ab167ecf298' type='text/css"> <script type="text/javascript" src="/wp-includes/js/dist/hooks.min.js?ver=4d63a3d491d11ffd8ac6" id="wp-hooks-js"></script> <script type="text/javascript" id="say-what-js-js-extra"> /* <![CDATA[ */ var say_what_data = {"replacements":{"|Biographical Info|":"Personal Mission","|Share a little biographical information to fill out your profile. This may be shown publicly.|":"Share a one sentence personal mission on OSGeo.","|Username or Email Address|":"OSGeo username"}}; /* ]]> */ </script> <script type="text/javascript" src="/wp-content/plugins/say-what/assets/build/frontend.js?ver=fd31684c45e4d85aeb4e" id="say-what-js-js"></script> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" id="jquery-js"></script> <link rel="https://api.w.org/" href="https://www.osgeo.org/wp-json/" /><link rel="alternate" title="oEmbed (JSON)" type="application/json+oembed" href="https://www.osgeo.org/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fwww.osgeo.org%2Fprojects%2Fmappyfile%2F" /> <link rel="alternate" title="oEmbed (XML)" type="text/xml+oembed" href="https://www.osgeo.org/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fwww.osgeo.org%2Fprojects%2Fmappyfile%2F&format=xml" /> <meta http-equiv="X-XRDS-Location" content="https://www.osgeo.org/?xrds" /> <meta http-equiv="X-Yadis-Location" content="https://www.osgeo.org/?xrds" /> <script>window.jQuery || document.write('<script src="https://www.osgeo.org/wp-content/themes/roots/assets/js/vendor/jquery-1.11.0.min.js"><\/script>')</script> <link rel="icon" href="https://www.osgeo.org/wp-content/uploads/cropped-osgeo-emblem-rgb-1-32x32.png" sizes="32x32" /> <link rel="icon" href="https://www.osgeo.org/wp-content/uploads/cropped-osgeo-emblem-rgb-1-192x192.png" sizes="192x192" /> <link rel="apple-touch-icon" href="https://www.osgeo.org/wp-content/uploads/cropped-osgeo-emblem-rgb-1-180x180.png" /> <meta name="msapplication-TileImage" content="https://www.osgeo.org/wp-content/uploads/cropped-osgeo-emblem-rgb-1-270x270.png" /> <link rel="alternate" type="application/rss+xml" title="OSGeo Feed" href="https://www.osgeo.org/feed/"> </head> <body class="project-template-default single single-project postid-12880 mappyfile"> <!--[if lt IE 8]> <div class="alert alert-warning"> You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience. </div> <![endif]--> <header class="banner navbar navbar-default navbar-static-top" role="banner"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="https://www.osgeo.org/"> <img class="img-responsive" src="https://www.osgeo.org/wp-content/themes/roots/assets/img/logo-osgeo.svg" alt="logo OSGeo" height="86" width="258"/> </a> </div> <nav class="collapse navbar-collapse" role="navigation"> <ul id="menu-mainmenu" class="mainmenu nav navbar-nav"><li class="has-megamenu menu-projects"><a href="https://www.osgeo.org/projects/">Projects</a></li> <li class="menu-resources"><a href="https://www.osgeo.org/resources/">Resources</a></li> <li class="dropdown menu-about-osgeo"><a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="https://www.osgeo.org/about/">About OSGeo <b class="icon-arrow-down"></b></a> <ul class="dropdown-menu"> <li class="menu-about-osgeo"><a href="https://www.osgeo.org/about/">About OSGeo</a></li> <li class="menu-what-is-open-source"><a href="https://www.osgeo.org/about/what-is-open-source/">What is Open Source?</a></li> <li class="menu-board-and-officers"><a href="https://www.osgeo.org/about/board/">Board and Officers</a></li> <li class="menu-charter-members"><a href="https://www.osgeo.org/about/charter-members/">Charter Members</a></li> <li class="menu-committees"><a href="https://www.osgeo.org/about/committees/">Committees</a></li> <li class="menu-sponsors"><a href="https://www.osgeo.org/sponsors/">Sponsors</a></li> <li class="menu-partners"><a href="https://www.osgeo.org/partners/">Partners</a></li> <li class="menu-foundation-news"><a href="/foundation-news/">Foundation News</a></li> <li class="menu-branding-material"><a href="https://www.osgeo.org/about/branding-material/">Branding Material</a></li> <li class="menu-contact"><a href="https://www.osgeo.org/about/contact/">Contact</a></li> <li class="menu-faq"><a href="https://www.osgeo.org/about/faq/">FAQ</a></li> </ul> </li> <li class="dropdown menu-initiatives"><a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="https://www.osgeo.org/initiatives/">Initiatives <b class="icon-arrow-down"></b></a> <ul class="dropdown-menu"> <li class="menu-geo-for-all"><a href="https://www.osgeo.org/initiatives/geo-for-all/">Geo for All</a></li> <li class="menu-foss4g-events"><a href="https://www.osgeo.org/initiatives/foss4g/">FOSS4G (Events)</a></li> <li class="menu-foss4g-travel-grants"><a href="https://www.osgeo.org/initiatives/foss4g-travel-grant-program/">FOSS4G Travel Grants</a></li> <li class="menu-open-geoscience"><a href="https://www.osgeo.org/initiatives/open-geoscience/">Open GeoScience</a></li> <li class="menu-un-initiative"><a href="https://www.osgeo.org/initiatives/un-initiative/">UN Initiative</a></li> <li class="menu-gsoc"><a href="https://www.osgeo.org/initiatives/gsoc/">GSoC</a></li> <li class="menu-osgeolive"><a href="https://www.osgeo.org/initiatives/osgeo-live-initiative/">OSGeoLive</a></li> <li class="menu-meta-crs-initiative"><a href="https://www.osgeo.org/meta-crs-initiative/">Meta CRS Initiative</a></li> </ul> </li> <li class="dropdown menu-community"><a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="https://www.osgeo.org/community/">Community <b class="icon-arrow-down"></b></a> <ul class="dropdown-menu"> <li class="menu-welcome"><a href="https://www.osgeo.org/community/welcome/">Welcome</a></li> <li class="menu-getting-started"><a href="https://www.osgeo.org/community/getting-started-osgeo/">Getting started</a></li> <li class="menu-local-chapters"><a href="https://www.osgeo.org/local-chapters/">Local Chapters</a></li> <li class="menu-code-of-conduct"><a href="https://www.osgeo.org/code_of_conduct/">Code of Conduct</a></li> <li class="menu-events"><a href="https://www.osgeo.org/events/">Events</a></li> <li class="menu-community-news"><a href="/community-news/">Community News</a></li> <li class="menu-communications"><a href="https://www.osgeo.org/community/communications/">Communications</a></li> <li class="menu-members"><a href="https://www.osgeo.org/community/members/">Members</a></li> <li class="menu-service-providers"><a href="https://www.osgeo.org/service-providers/">Service Providers</a></li> <li class="menu-awards"><a href="https://www.osgeo.org/community/awards/">Awards</a></li> </ul> </li> </ul> <ul id="menu-metamenu" class="metamenu list-inline"><li class="menu-news"><a href="https://www.osgeo.org/foundation-news/">News</a></li> <li class="menu-wiki"><a href="http://wiki.osgeo.org">Wiki</a></li> <li class="menu-contact"><a href="https://www.osgeo.org/about/contact/">Contact</a></li> <li class="menu-sign-in"><a href="/wp-admin/">Sign in</a></li> <li class="menu-search"><a href="https://www.osgeo.org/search/">Search</a></li> </ul> </nav> </div> </header> <nav class="megamenu is-hidden"> <div class="container"> <div class="row"> <div class="col-sm-3"> <ul class="removelist nav-tabs"> <li class="active"><a href="#osgeo" data-toggle="tab" title="Show OSGeo Projects">OSGeo Projects</a></li> <li><a href="#community" data-toggle="tab" title="Community projects">Community projects</a></li> </ul> <ul class="removelist"> <li><a class="link-overview" href="https://www.osgeo.org/projects/" title="View all projects">View all projects <span class="icon-arrow-right"></span></a></li> <li><a class="link-overview" href="https://www.osgeo.org/choose-a-project/" title="Choose a project">Choose a project <span class="icon-arrow-right"></span></a></li> </ul> </div> <div class="col-sm-9"> <div class="tab-content"> <div role="tabpanel" class="tab-pane active" id="osgeo"> <h1 class="title title-h2">OSGeo Projects</h1> <ul class="removelist row"> <li class="col-sm-4"> <h2 class="title title-h5">Content Management Systems</h2> <ul class="removelist list projects"> <li><a href="https://www.osgeo.org/projects/geonode/" title="GeoNode">GeoNode</a></li> </ul> </li> <li class="col-sm-4"> <h2 class="title title-h5">Desktop Applications</h2> <ul class="removelist list projects"> <li><a href="https://www.osgeo.org/projects/marble/" title="Marble">Marble</a></li> <li><a href="https://www.osgeo.org/projects/gvsig/" title="gvSIG Desktop">gvSIG Desktop</a></li> <li><a href="https://www.osgeo.org/projects/qgis/" title="QGIS Desktop">QGIS Desktop</a></li> </ul> </li> <li class="col-sm-4"> <h2 class="title title-h5">Geospatial Libraries</h2> <ul class="removelist list projects"> <li><a href="https://www.osgeo.org/projects/proj/" title="PROJ">PROJ</a></li> <li><a href="https://www.osgeo.org/projects/geotools/" title="GeoTools">GeoTools</a></li> <li><a href="https://www.osgeo.org/projects/orfeo-toolbox/" title="Orfeo ToolBox">Orfeo ToolBox</a></li> <li><a href="https://www.osgeo.org/projects/gdal/" title="GDAL/OGR">GDAL/OGR</a></li> <li><a href="https://www.osgeo.org/projects/geos/" title="GEOS">GEOS</a></li> <li><a href="https://www.osgeo.org/projects/pgrouting/" title="pgRouting">pgRouting</a></li> <li><a href="https://www.osgeo.org/projects/grass-gis/" title="GRASS GIS">GRASS GIS</a></li> </ul> </li> <li class="col-sm-4"> <h2 class="title title-h5">Metadata Catalogs</h2> <ul class="removelist list projects"> <li><a href="https://www.osgeo.org/projects/geonetwork/" title="GeoNetwork">GeoNetwork</a></li> <li><a href="https://www.osgeo.org/projects/pycsw/" title="pycsw">pycsw</a></li> </ul> </li> <li class="col-sm-4"> <h2 class="title title-h5">Other</h2> <ul class="removelist list projects"> <li><a href="https://www.osgeo.org/projects/osgeolive/" title="OSGeoLive">OSGeoLive</a></li> </ul> </li> <li class="col-sm-4"> <h2 class="title title-h5">Spatial Databases</h2> <ul class="removelist list projects"> <li><a href="https://www.osgeo.org/projects/postgis/" title="PostGIS">PostGIS</a></li> </ul> </li> <li class="col-sm-4"> <h2 class="title title-h5">Web Mapping</h2> <ul class="removelist list projects"> <li><a href="https://www.osgeo.org/projects/pygeoapi/" title="pygeoapi">pygeoapi</a></li> <li><a href="https://www.osgeo.org/projects/mapserver/" title="MapServer">MapServer</a></li> <li><a href="https://www.osgeo.org/projects/deegree/" title="deegree">deegree</a></li> <li><a href="https://www.osgeo.org/projects/zoo-project/" title="ZOO-Project">ZOO-Project</a></li> <li><a href="https://www.osgeo.org/projects/openlayers/" title="OpenLayers">OpenLayers</a></li> <li><a href="https://www.osgeo.org/projects/geomoose/" title="GeoMoose">GeoMoose</a></li> <li><a href="https://www.osgeo.org/projects/mapbender/" title="Mapbender">Mapbender</a></li> <li><a href="https://www.osgeo.org/projects/pywps/" title="PyWPS">PyWPS</a></li> <li><a href="https://www.osgeo.org/projects/geoserver/" title="GeoServer">GeoServer</a></li> </ul> </li> </ul> </div> <div role="tabpanel" class="tab-pane" id="community"> <h1 class="title title-h2">Community projects</h1> <ul class="removelist row"> <li class="col-sm-4"> <h2 class="title title-h5">Desktop Applications</h2> <ul class="removelist list projects"> <li><a href="https://www.osgeo.org/projects/osgeo4w/" title="OSGeo4W">OSGeo4W</a></li> <li><a href="https://www.osgeo.org/projects/opticks/" title="Opticks">Opticks</a></li> </ul> </li> <li class="col-sm-4"> <h2 class="title title-h5">Geospatial Libraries</h2> <ul class="removelist list projects"> <li><a href="https://www.osgeo.org/projects/torchgeo/" title="TorchGeo">TorchGeo</a></li> <li><a href="https://www.osgeo.org/projects/mappyfile/" title="mappyfile">mappyfile</a></li> <li><a href="https://www.osgeo.org/projects/etf/" title="ETF">ETF</a></li> <li><a href="https://www.osgeo.org/projects/proj-jni/" title="PROJ-JNI">PROJ-JNI</a></li> <li><a href="https://www.osgeo.org/projects/geostyler/" title="GeoStyler">GeoStyler</a></li> <li><a href="https://www.osgeo.org/projects/open-data-cube/" title="Open Data Cube">Open Data Cube</a></li> <li><a href="https://www.osgeo.org/projects/mdal/" title="Mesh Data Abstraction Library (MDAL)">Mesh Data Abstraction Library (MDAL)</a></li> <li><a href="https://www.osgeo.org/projects/actinia/" title="actinia">actinia</a></li> <li><a href="https://www.osgeo.org/projects/pronto-raster/" title="Pronto Raster">Pronto Raster</a></li> <li><a href="https://www.osgeo.org/projects/owslib/" title="OWSLib">OWSLib</a></li> <li><a href="https://www.osgeo.org/projects/fdo/" title="FDO">FDO</a></li> <li><a href="https://www.osgeo.org/projects/ossim/" title="OSSIM">OSSIM</a></li> </ul> </li> <li class="col-sm-4"> <h2 class="title title-h5">Metadata Catalogs</h2> <ul class="removelist list projects"> </ul> </li> <li class="col-sm-4"> <h2 class="title title-h5">Mobile Applications</h2> <ul class="removelist list projects"> </ul> </li> <li class="col-sm-4"> <h2 class="title title-h5">Other</h2> <ul class="removelist list projects"> <li><a href="https://www.osgeo.org/projects/eoepca/" title="EOEPCA+">EOEPCA+</a></li> <li><a href="https://www.osgeo.org/projects/geoserver-client-php/" title="GeoServer Client PHP">GeoServer Client PHP</a></li> <li><a href="https://www.osgeo.org/projects/loader-project/" title="Loader">Loader</a></li> <li><a href="https://www.osgeo.org/projects/geohealthcheck/" title="GeoHealthCheck">GeoHealthCheck</a></li> <li><a href="https://www.osgeo.org/projects/portable-gis/" title="Portable GIS">Portable GIS</a></li> <li><a href="https://www.osgeo.org/projects/teamengine/" title="TEAM Engine">TEAM Engine</a></li> </ul> </li> <li class="col-sm-4"> <h2 class="title title-h5">Spatial Databases</h2> <ul class="removelist list projects"> <li><a href="https://www.osgeo.org/projects/giswater/" title="Giswater">Giswater</a></li> <li><a href="https://www.osgeo.org/projects/mobilitydb/" title="MobilityDB">MobilityDB</a></li> <li><a href="https://www.osgeo.org/projects/rasdaman/" title="rasdaman">rasdaman</a></li> </ul> </li> <li class="col-sm-4"> <h2 class="title title-h5">Web Mapping</h2> <ul class="removelist list projects"> <li><a href="https://www.osgeo.org/projects/xyz-mapp/" title="XYZ / MAPP">XYZ / MAPP</a></li> <li><a href="https://www.osgeo.org/projects/geoext/" title="GeoExt">GeoExt</a></li> <li><a href="https://www.osgeo.org/projects/gc2-vidi/" title="GC2/Vidi">GC2/Vidi</a></li> <li><a href="https://www.osgeo.org/projects/geowebcache/" title="GeoWebCache">GeoWebCache</a></li> <li><a href="https://www.osgeo.org/projects/mapguide-open-source/" title="MapGuide Open Source">MapGuide Open Source</a></li> <li><a href="https://www.osgeo.org/projects/mapfish/" title="mapfish">mapfish</a></li> <li><a href="https://www.osgeo.org/projects/istsos/" title="istSOS">istSOS</a></li> </ul> </li> </ul> </div> </div> </div> </div> </div> </nav> <main class="main template-single single-project"> <header class="block page-intro"> <div class="container"> <div class="row"> <div class="col-md-8"> <div class="breadcrumbs"> <p id="breadcrumbs"><span><span><a href="https://www.osgeo.org/">Home</a></span> » <span><a href="https://www.osgeo.org/projects/">Projects</a></span> » <span class="breadcrumb_last" aria-current="page">mappyfile</span></span></p> </div> <h1 class="title title-h1">mappyfile</h1> <p>A Python library to create, parse, modify, and format <a class="reference external" href="http://mapserver.org/documentation.html">MapServer</a> Mapfiles.</p> <div class="col-md-4"> <img src="https://www.osgeo.org/wp-content/themes/roots/assets/img/badge-community-project.png" alt="community project" height="32" width="83"> </div> </div> <div class="col-md-4"> <ul class="removelist"> <li> <a class="link-overview" href="https://www.osgeo.org/projects/"><span class="icon-arrow-right"></span> Back to projects</a> </li> <li> <img class="img-responsive" src="https://www.osgeo.org/wp-content/uploads/mappyfile_logo-370x206.png" title="mappyfile_logo" alt="mappyfile_logo" /> </li> </ul> </div> </div> </div> </header> <section class="block detail"> <div class="container"> <div class="row"> <div class="col-md-8"> <div class="entry-content"> <h2>mappyfile</h2> <img src="https://www.osgeo.org/wp-content/themes/roots/assets/img/badge-community-project.png" alt="community project" height="32" width="83"><img class="img-responsive" src="https://www.osgeo.org/wp-content/uploads/mappyfile_logo-370x206.png" title="mappyfile_logo" alt="mappyfile_logo" /> <p><em>mappyfile</em> takes a Mapfile as input and parses it into an <a class="reference external" href="https://en.wikipedia.org/wiki/Abstract_syntax_tree">Abstract syntax tree (AST)</a> using <a class="reference external" href="https://github.com/lark-parser/lark">lark</a> a Python parsing library. mappyfile can then transform the AST into a dictionary structure, containing keys and values of dicts, and lists familiar to Python programmers. This structure can be edited directly. Alternatively new objects can be added by parsing further Mapfile text and inserting into the dictionary structure.</p> <p>mappyfile also includes a “pretty printer” to export this dictionary structure back to a Mapfile, with keyword formatting and indentation.</p> <p>An online-editor built on mappyfile is available at <a href="https://app.mapserverstudio.net/" target="_blank" rel="noopener">https://app.mapserverstudio.net/</a>.</p> <section class="widget core-feature"> <h2 class="title title-h2">Core features</h2> <ul class="removelist row"> <li class="col-sm-6"> <h3 class="title title-h5">Python Library</h3> <ul class="removelist"> <li>Pure Python - no MapServer dependencies</li> <li>Open Source License (MIT)</li> </ul> </li> <li class="col-sm-6"> <h3 class="title title-h5">Mapfile Functionality</h3> <ul class="removelist"> <li>Parsing</li> <li>Transforming</li> <li>Pretty Printing</li> <li>Validation</li> </ul> </li> </ul> </section> </div> </div> <div class="col-md-4"> <img class="img-responsive" src="https://www.osgeo.org/wp-content/uploads/class_parsed-570x197.png" title="" alt="" /> </div> </div><!-- .row --> </div><!-- .container --> </section> <aside class="widgets"> <div class="container"> <h2>About mappyfile</h2> <div class="row"> <div class="col-sm-4"> <div class="widget projecttype"> <h3 class="title title-h5">Project type</h3> <ul class="removelist"> <li> Geospatial Libraries </li> <li> Web Mapping </li> </ul> </div> <div class="widget projecttype"> <h3 class="title title-h5">Who's involved</h3> <ul class="list-inline"> <li> <a href="https://www.osgeo.org/member/girvin/"> <img alt='Seth Girvin' src='https://secure.gravatar.com/avatar/298a18d2459d0ed243fc5733bed63496?s=40&d=mm&r=g' srcset='https://secure.gravatar.com/avatar/298a18d2459d0ed243fc5733bed63496?s=80&d=mm&r=g 2x' title='Seth Girvin' class='avatar img-responsive avatar-40 photo img-responsive' height='40' width='40' decoding='async'/> </a> </li> </ul> <a class="link-overview" href="https://www.osgeo.org/community/members/?p=mappyfile">View all <span class="icon-arrow-right"></span></a> </div> <div class="widget communications"> <h3 class="title title-h5">Communication</h3> <ul class="social list-inline"> <li><a href = "https://twitter.com/geographika" ><span class="icon-twitter"></span></a></li> </ul> </div> </div> <div class="col-sm-4"> <div class="widget endusers-resources"> <h3 class="title title-h5">End-user resources</h3> <ul class="removelist"> <li> <a class="link-external" href="https://github.com/geographika/mappyfile/pulse"> <span class="icon-pulse"></span>Pulse </a> </li> <li> <a class="link-external" href="https://github.com/geographika/mappyfile/"> <span class="icon-source-tracker"></span>Source Code </a> </li> <li> <a class="link-external" href="https://mappyfile.readthedocs.io/"> <span class="icon-documentation"></span>Documentation </a> </li> <li> <a class="link-external" href="https://github.com/geographika/mappyfile/graphs/contributors"> <span class="icon-contributors"></span>Contributors </a> </li> <li> <a class="link-external" href="https://www.openhub.net/p/mappyfile"> <span class="icon-metrics"></span>Metrics </a> </li> <li> <a class="link-external" href="https://github.com/geographika/mappyfile/issues"> <span class="icon-issue-tracker"></span>Issue Trackers </a> </li> </ul> </div> </div> <div class="col-sm-4"> <div class="widget license"> <h3 class="title title-h5">License</h3> <p>MIT License</p> </div> </div> </div><!--.row --> </div><!-- .container --> </aside> </main> <footer class="content-info" role="contentinfo"> <section class="block lets-connect"> <div class="container"> <h3 class="title title-h2">Let's connect</h3> <div class="row"> <div class="col-lg-6 col-md-7"> <section class="subscriptions"> <p>Subscribe to our</p> <ul class="removelist"> <li> <a class="btn read-more" href="https://www.osgeo.org/community/communications/" title="Mailing lists">Mailing lists</a> </li> </ul> </section> </div> <div class="col-lg-6 col-md-4"> <section class="social-media"> <p>Find us on</p> <ul class="social list-inline"> <li><a href = "https://www.facebook.com/OSGeoFoundation/" ><span class="icon-facebook"></span></a></li> <li><a href = "https://www.linkedin.com/company/osgeo/" ><span class="icon-linkedin"></span></a></li> </ul> </section> </div> </div> </div> </section> <section class="block colophon"> <div class="container"> <p>© 2025 OSGeo - All rights reserved</p> <ul id="menu-footermenu" class="metamenu list-inline"><li class="menu-legal-information"><a href="https://www.osgeo.org/legal-information/">Legal information</a></li> <li class="menu-colophon"><a href="https://www.osgeo.org/colophon/">Colophon</a></li> </ul> <p>Design & Development by <a href="http://www.getinteractive.org">Get Interactive</a></p> </div> </section> <div class="compass-footer"></div> </footer> <script type="text/javascript" id="roots_scripts-js-extra"> /* <![CDATA[ */ var vars = {"adminUrl":"https:\/\/www.osgeo.org\/wp-admin\/admin-ajax.php","userId":"0","iconDir":"https:\/\/www.osgeo.org\/wp-content\/themes\/roots\/assets\/img\/","siteUrl":"https:\/\/www.osgeo.org","componentDir":"https:\/\/www.osgeo.org\/wp-content\/themes\/roots\/assets\/js\/component"}; /* ]]> */ </script> <script type="text/javascript" src="/wp-content/themes/roots/assets/js/scripts.min.js?ver=3ac1f89085296095ad2dda23e540f60e" id="roots_scripts-js"></script> <script type="text/javascript" src="/wp-content/themes/roots/assets/js/bundle.js" id="bundle-js"></script> <script> window.jQuery(function () { window.jQuery('.cancel-crop-button').css('display', 'none'); }()); </script> </body> </html>