Пример #1
0
import pprint
import pgmapcss.parser
import pgmapcss.compiler
import pgmapcss.version
import pgmapcss.icons
import argparse
import getpass
import pgmapcss.db
import pgmapcss.eval
import os

parser = argparse.ArgumentParser(description='Compiles a MapCSS style description into PostgreSQL functions and builds an accompanying Mapnik stylesheet.')

parser.add_argument('style_id', type=str, help='''\
  style_id is a required argument. The compiled functions will be prefixed
  by 'style_id', e.g. 'pgmapcss_style_id()'. Also the resulting mapnik style
  file will be called style_id.mapnik.
''')

parser.add_argument('-d', '--database', dest='database',
    default=getpass.getuser(),
    help='Name of database (default: username)')

parser.add_argument('-u', '--user', dest='user',
    default=getpass.getuser(),
    help='User for database (default: username)')

parser.add_argument('-p', '--password', dest='password',
    default='PASSWORD',
    help='Password for database (default: PASSWORD)')
Пример #2
0
import re
import pprint
import pgmapcss.parser
import pgmapcss.compiler
import pgmapcss.version
import argparse
import getpass
import pgmapcss.db
import pgmapcss.eval
import os

parser = argparse.ArgumentParser(description='Compiles a MapCSS style description into PostgreSQL functions and builds an accompanying Mapnik stylesheet.')

parser.add_argument('style_id', type=str, help='''\
  style_id is a required argument. The compiled functions will be prefixed
  by 'style_id', e.g. 'style_id_match()'. Also the resulting mapnik style file
  will be called style_id.mapnik.
''')

parser.add_argument('-d', '--database', dest='database',
    default=getpass.getuser(),
    help='Name of database (default: username)')

parser.add_argument('-u', '--user', dest='user',
    default=getpass.getuser(),
    help='User for database (default: username)')

parser.add_argument('-p', '--password', dest='password',
    default='PASSWORD',
    help='Password for database (default: PASSWORD)')
Пример #3
0
import pgmapcss.parser
import pgmapcss.compiler
import pgmapcss.version
import pgmapcss.icons
import pgmapcss.symbols
import argparse
import getpass
import pgmapcss.db
import pgmapcss.eval
import os

parser = argparse.ArgumentParser(description='Compiles a MapCSS style description into PostgreSQL functions and builds an accompanying Mapnik stylesheet.')

parser.add_argument('style_id', type=str, help='''\
  style_id is a required argument. The compiled functions will be prefixed
  by 'style_id', e.g. 'pgmapcss_style_id()'. Also the resulting mapnik style
  file will be called style_id.mapnik.
''')

parser.add_argument('-d', '--database', dest='database',
    default=getpass.getuser(),
    help='Name of database (default: username)')

parser.add_argument('--database-type', dest='database_type',
    default='overpass',
    help='Type of database, see doc/database.md for details. (currently supported: overpass (default), osm2pgsql, osmosis)')

parser.add_argument('-u', '--user', dest='user',
    default=getpass.getuser(),
    help='User for database (default: username)')