urbica martin 部署和使用

官网:https://martin.urbica.co/

urbica是莫斯科一家做可视化的公司。

github 地址:https://github.com/urbica/martin

tips: postgis 安装的时候,需要有protobuf支持。参考:https://blog.csdn.net/aganliang/article/details/103171744

 

下载
martin-Linux-x86_64.tar.gz

解压,只有一个martin文件

建立软连接
ln -s /root/martin /usr/local/bin/martin

启动
martin postgres://username:pwd@ip:port/db

防火墙开通3000端口
firewall-cmd --zone=public --add-port=3000/tcp --permanent
firewall-cmd --reload


endpoint:
http://localhost:3000/index.json
http://localhst:3000/topology.xzqh_wg.json

config.yaml样例

---
# Database connection string
connection_string: ""

# Connection keep alive timeout [default: 75]
keep_alive: 75

# The socket address to bind [default: 0.0.0.0:3000]
listen_addresses: "ip:port"

# Maximum connections pool size [default: 20]
pool_size: 60     # 设置太大的话,启动不了

# Enable watch mode
watch: false

# Trust invalid certificates. This introduces significant vulnerabilities, and should only be used as a last resort.
danger_accept_invalid_certs: false

# Number of web server workers
worker_processes: 8

# associative arrays of table sources
table_sources:
  topology.mlp:
    # table source id
    id: topology.mlp
    # table schema
    schema: topology
    # table name
    table: d_mlp_2020
    # geometry column name
    geometry_column: geom
    # geometry srid
    srid: 4326
    # tile extent in tile coordinate space
    extent: 4096
    # buffer distance in tile coordinate space to optionally clip geometries
    buffer: 64
    # boolean to control if geometries should be clipped or encoded as is
    clip_geom: true
    # geometry type
    geometry_type: POINT
    # list of columns, that should be encoded as tile properties
    properties:
      mpwzhm: varchar
      mpdzmc: varchar
      dzdm: varchar
      dzqc: varchar

  topology.yw_cameras:
    # table source id
    id: topology.yw_cameras
    # table schema
    schema: topology
    # table name
    table: yw_cameras
    # geometry column name
    geometry_column: geom
    # geometry srid
    srid: 4326
    # tile extent in tile coordinate space
    extent: 4096
    # buffer distance in tile coordinate space to optionally clip geometries
    buffer: 64
    # boolean to control if geometries should be clipped or encoded as is
    clip_geom: true
    # geometry type
    geometry_type: POINT
    # list of columns, that should be encoded as tile properties
    properties:
      sbbm: varchar
      sbmc: varchar
      sxjlx: varchar


  topology.yw_spjks:
    # table source id
    id: topology.yw_spjks
    # table schema
    schema: topology
    # table name
    table: yw_spjks
    # geometry column name
    geometry_column: geom
    # geometry srid
    srid: 4326
    # tile extent in tile coordinate space
    extent: 4096
    # buffer distance in tile coordinate space to optionally clip geometries
    buffer: 64
    # boolean to control if geometries should be clipped or encoded as is
    clip_geom: true
    # geometry type
    geometry_type: POINT
    # list of columns, that should be encoded as tile properties
    properties:
        name: varchar



 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值