Skip to content

Maps4HTML/pygeoapi-mapml-formatter

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

pygeoapi-mapml-formatter

MapML Formatter Plugin for pygeoapi

Installation

  1. Install pygepapi

  2. Copy mapml.py into pygeoapi/pygeoapi/formatter

  3. Add 'mapml' to the FORMATS array on line 79.

  4. Copy the below snipping into lines 1090 and 1248 of pygeoapi/api.py. Appending to the existing if else if blocks,

    elif format_ == 'mapml':
      formatter = load_plugin('formatter', {'name': 'MapML', 'geom': True})
      content = formatter.write(
          data=content,
          options={}
      )
    
      headers_['Content-Type'] = '{}; charset={}'.format(
          formatter.mimetype, self.config['server']['encoding'])
    
      return headers_, 200, content
  5. Add 'MapML': 'pygeoapi.formatter.mapml.MapMLFormatter' to the formatters array on line 55 in the pygeoapi/plugin.py file

  6. Build pygeoapi as you would before, now you can use ?f=mapml to serve mapml features.

About

MapML Formatter Plugin for pygeoapi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages