SkillAgentSearch skills...

Fastmap

Fast OSM API /map call implementation

Install / Use

/learn @Komzpa/Fastmap
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

fastmap

Fast OSM API /map call implementation in pure SQL.

why

This /map call takes 22 seconds to complete on osm.org. Current cgimap implementation needs ~2 network round trips between database and application, effectively limiting API speed to ~2000 objects per second.

Details in Operations ticket: https://github.com/openstreetmap/operations/issues/135

development cycle quick start

# set up your Postgres environment
export PGUSER=gis PGDATABASE=gis

# import data to your postgres
zcat minsk.sqld.gz | psql

# change something
vim fastmap.sql

# re-export reference data and explain
make

# observe changes you've made
git diff

getting complete database schema

To have a look at schema, there is SVG on wiki:

Datanbase schema

We believe there is postgres database gis, user gis, accepting trust connections on localhost.

# grab software
sudo apt install osmosis curl wget unzip
# import schema
curl https://raw.githubusercontent.com/openstreetmap/openstreetmap-website/master/db/structure.sql | psql
# get latest osmosis wit non-broken pbf support
wget http://bretth.dev.openstreetmap.org/osmosis-build/osmosis-latest.zip
unzip osmosis-latest.zip
# grab osm dump of Belarus
wget http://data.gis-lab.info/osm_dump/dump/latest/BY.osm.pbf
# import
bin/osmosis --read-pbf file="BY.osm.pbf" --log-progress --write-apidb database="gis" user="gis" host="localhost" validateSchemaVersion=no
View on GitHub
GitHub Stars9
CategoryDevelopment
Updated1y ago
Forks1

Languages

PLpgSQL

Security Score

55/100

Audited on May 17, 2024

No findings