Skip to content

Maps4HTML/pygeoapi-mapml-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

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