Consolidate DB init and tests (#463)

* Add justfile to simplify running all the tests
* Save all PBF outputs to the text files
* Consolidate all tests to reuse the same code
* Consolidate database initialization
* updated readme with the new instructions

Note that while this PR creates "expected" files, the CI cannot validate
the generated results because the output is not stable. Eventually we
may try to output just the non-geometry values to have reasonable tests
comparing against the expected results.
This commit is contained in:
Yuri Astrakhan 2022-10-28 14:52:39 -04:00 committed by GitHub
parent 01b9fe4fe1
commit a0a411f088
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
66 changed files with 314449 additions and 143 deletions

View File

@ -11,3 +11,4 @@ Dockerfile
pg_data/
config.yml
tests/output/

View File

@ -18,13 +18,10 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install fmt & clippy
run: rustup component add clippy rustfmt
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run cargo clippy
run: cargo clippy --all-targets --all-features -- -D warnings
@ -38,7 +35,7 @@ jobs:
PGUSER: postgres
services:
postgres:
image: postgis/postgis:14-3.1-alpine
image: postgis/postgis:14-3.3-alpine
env:
# POSTGRES_* variables are used by the postgis/postgres image
POSTGRES_DB: ${{ env.PGDATABASE }}
@ -63,26 +60,31 @@ jobs:
- name: Run tests
run: cargo test --all
env:
DATABASE_URL: postgres://postgres@localhost:${{ job.services.postgres.ports[5432] }}/db
DATABASE_URL: postgres://${{ env.PGUSER }}@${{ env.PGHOST }}:${{ job.services.postgres.ports[5432] }}/${{ env.PGDATABASE }}
- name: Run build
run: cargo build
- name: Run martin with pg auto-discovery
run: ./target/debug/martin --default-srid 900913 &
- name: Run martin tests
run: ./tests/test.sh
env:
DATABASE_URL: postgres://postgres@localhost:${{ job.services.postgres.ports[5432] }}/db
MARTIN_BIN: ./target/debug/martin
DATABASE_URL: postgres://${{ env.PGUSER }}@${{ env.PGHOST }}:${{ job.services.postgres.ports[5432] }}/${{ env.PGDATABASE }}
- name: Test auto-discovered source responses
run: tests/test-auto-sources.sh
- name: Compare test output results (TODO)
if: false
run: |
# TODO: this test is currently broken because the output of the tests is not deterministic
diff --brief --recursive --new-file tests/output tests/expected
- name: Run server with config, overriding connection
run: pkill martin && ./target/debug/martin --config ./tests/config.yaml "$CONNECTION" &
env:
CONNECTION: postgres://postgres@localhost:${{ job.services.postgres.ports[5432] }}/db
- name: 'Save test output on failure'
if: failure()
uses: actions/upload-artifact@v3
with:
name: test-output
path: tests/output/*
retention-days: 5
- name: Test pre-configured source responses
run: tests/test-configured-sources.sh
build:
needs: [test]

View File

@ -11,15 +11,23 @@ name: Code coverage
jobs:
grcov:
runs-on: ubuntu-latest
env:
# PG_* variables are used by psql
PGDATABASE: test
PGHOST: localhost
PGUSER: postgres
services:
postgres:
image: postgis/postgis:13-3.1-alpine
image: postgis/postgis:14-3.3-alpine
env:
POSTGRES_DB: test
POSTGRES_USER: postgres
# POSTGRES_* variables are used by the postgis/postgres image
POSTGRES_DB: ${{ env.PGDATABASE }}
POSTGRES_USER: ${{ env.PGUSER }}
POSTGRES_HOST_AUTH_METHOD: trust
ports:
# will assign a random free host port
- 5432/tcp
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout sources
@ -28,18 +36,9 @@ jobs:
- name: Setup database
run: |
sudo apt-get install postgresql-client
psql -h $POSTGRES_HOST -p $POSTGRES_PORT -U postgres -d test -f tests/fixtures/TileBBox.sql
psql -h $POSTGRES_HOST -p $POSTGRES_PORT -U postgres -d test -f tests/fixtures/table_source.sql
psql -h $POSTGRES_HOST -p $POSTGRES_PORT -U postgres -d test -f tests/fixtures/table_source_multiple_geom.sql
psql -h $POSTGRES_HOST -p $POSTGRES_PORT -U postgres -d test -f tests/fixtures/function_source.sql
psql -h $POSTGRES_HOST -p $POSTGRES_PORT -U postgres -d test -f tests/fixtures/function_source_query_params.sql
psql -h $POSTGRES_HOST -p $POSTGRES_PORT -U postgres -d test -f tests/fixtures/points1_source.sql
psql -h $POSTGRES_HOST -p $POSTGRES_PORT -U postgres -d test -f tests/fixtures/points2_source.sql
psql -h $POSTGRES_HOST -p $POSTGRES_PORT -U postgres -d test -f tests/fixtures/points3857_source.sql
psql -h $POSTGRES_HOST -p $POSTGRES_PORT -U postgres -d test -f tests/fixtures/points_empty_srid_source.sql
tests/fixtures/initdb.sh
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}
PGPORT: ${{ job.services.postgres.ports[5432] }}
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@master
@ -53,7 +52,7 @@ jobs:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
DATABASE_URL: postgres://postgres@localhost:${{ job.services.postgres.ports[5432] }}/test
DATABASE_URL: postgres://${{ env.PGUSER }}@${{ env.PGHOST }}:${{ job.services.postgres.ports[5432] }}/${{ env.PGDATABASE }}
- name: Gather coverage data
id: coverage

1
.gitignore vendored
View File

@ -7,3 +7,4 @@
pg_data/
config.yml
tests/output/

View File

@ -762,22 +762,35 @@ martin postgres://postgres@localhost/db
## Development
Clone project
* Clone Martin
* Install [docker](https://docs.docker.com/get-docker/), [docker-compose](https://docs.docker.com/compose/), and [Just](https://github.com/casey/just#readme) (improved makefile processor)
* Run `just` to see available commands:
```shell
git clone git@github.com:maplibre/martin.git
cd martin
```shell, ignore
git clone git@github.com:maplibre/martin.git
cd martin
just
Available recipes:
bench # Run benchmark tests
clean # Perform cargo clean to delete all build files
clean-test # Delete test output files
run # Start Martin server and a test database
start-db # Start a test database
stop # Stop the test database
test # Run all tests using a test database
test-bless # Run integration tests and save its output as the new expected output
test-int # Run integration tests
test-unit # Run Rust unit tests (cargo test)
```
Start `db` service using [docker-compose](https://docs.docker.com/compose/)
### Other useful commands
```shell
# Start db service
docker-compose up -d db
```
Then, after `db` service is ready to accept connections, you can start `martin` with
```shell
# Run Martin server
DATABASE_URL=postgres://postgres@localhost/db cargo run
```

54
justfile Normal file
View File

@ -0,0 +1,54 @@
#!/usr/bin/env just --justfile
set shell := ["bash", "-c"]
export DATABASE_URL := "postgres://postgres@localhost/db"
export CARGO_TERM_COLOR := "always"
# export RUST_BACKTRACE := "1"
@_default:
just --list
# Start Martin server and a test database
run: start-db
cargo run
# Perform cargo clean to delete all build files
clean: clean-test
cargo clean
# Delete test output files
clean-test:
rm -rf tests/output
# Start a test database
start-db:
docker-compose up -d db
alias _down := stop
alias _stop-db := stop
# Stop the test database
stop:
docker-compose down
# Run benchmark tests
bench: start-db
cargo bench
# Run all tests using a test database
test: start-db test-unit test-int
# Run Rust unit tests (cargo test)
test-unit: start-db
cargo test
# Run integration tests
test-int: start-db clean-test
tests/test.sh
diff --brief --recursive --new-file tests/output tests/expected
# Run integration tests and save its output as the new expected output
test-bless: start-db clean-test
tests/test.sh
rm -rf tests/expected
mv tests/output tests/expected

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,40 @@
=============================================================
layer: 0
name: public.table_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(2,1718)
properties:
gid=19
feature: 1
id: (none)
geomtype: point
geometry:
POINT(583,3673)
properties:
gid=21
feature: 2
id: (none)
geomtype: point
geometry:
POINT(1667,1002)
properties:
gid=22
feature: 3
id: (none)
geomtype: point
geometry:
POINT(803,1477)
properties:
gid=23
feature: 4
id: (none)
geomtype: point
geometry:
POINT(763,1123)
properties:
gid=24

Binary file not shown.

View File

@ -0,0 +1,33 @@
=============================================================
layer: 0
name: public.table_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(3,3436)
properties:
gid=19
feature: 1
id: (none)
geomtype: point
geometry:
POINT(3335,2005)
properties:
gid=22
feature: 2
id: (none)
geomtype: point
geometry:
POINT(1606,2954)
properties:
gid=23
feature: 3
id: (none)
geomtype: point
geometry:
POINT(1526,2247)
properties:
gid=24

Binary file not shown.

View File

@ -0,0 +1,26 @@
=============================================================
layer: 0
name: public.table_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(6,2776)
properties:
gid=19
feature: 1
id: (none)
geomtype: point
geometry:
POINT(3212,1811)
properties:
gid=23
feature: 2
id: (none)
geomtype: point
geometry:
POINT(3052,398)
properties:
gid=24

Binary file not shown.

View File

@ -0,0 +1,12 @@
=============================================================
layer: 0
name: public.table_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(412,1562)
properties:
gid=19

Binary file not shown.

View File

@ -0,0 +1,12 @@
=============================================================
layer: 0
name: public.table_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(823,3124)
properties:
gid=19

Binary file not shown.

View File

@ -0,0 +1,73 @@
=============================================================
layer: 0
name: public.table_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(2816,27)
properties:
gid=19
feature: 1
id: (none)
geomtype: point
geometry:
POINT(2803,73)
properties:
gid=20
feature: 2
id: (none)
geomtype: point
geometry:
POINT(2825,57)
properties:
gid=21
feature: 3
id: (none)
geomtype: point
geometry:
POINT(2842,16)
properties:
gid=22
feature: 4
id: (none)
geomtype: point
geometry:
POINT(2829,23)
properties:
gid=23
feature: 5
id: (none)
geomtype: point
geometry:
POINT(2828,18)
properties:
gid=24
=============================================================
layer: 1
name: public.points2
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(3878,367)
properties:
gid=1611
feature: 1
id: (none)
geomtype: point
geometry:
POINT(3935,900)
properties:
gid=6611
feature: 2
id: (none)
geomtype: point
geometry:
POINT(521,3142)
properties:
gid=7409

Binary file not shown.

View File

@ -0,0 +1,162 @@
=============================================================
layer: 0
name: public.function_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(2048,2048)
properties:
feature: 1
id: (none)
geomtype: point
geometry:
POINT(2025,2025)
properties:
feature: 2
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=2](2048 2048,2059 2037)
properties:
feature: 3
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=2](2071 2025,2082 2014)
properties:
feature: 4
id: (none)
geomtype: point
geometry:
POINT(2389,1934)
properties:
feature: 5
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=3](2389 1934,2162 1690,2503 1551)
properties:
feature: 6
id: (none)
geomtype: polygon
geometry:
RING[count=5](2162 1816,2276 1551,2503 1551,2389 1934,2162 1816)[OUTER]
properties:
feature: 7
id: (none)
geomtype: polygon
geometry:
RING[count=5](2560 1473,2446 1934,2162 1816,2219 1551,2560 1473)[OUTER]
RING[count=4](2446 1622,2276 1690,2389 1816,2446 1622)[INNER]
properties:
feature: 8
id: (none)
geomtype: point
geometry:
POINT(2162,1551)
POINT(2276,1816)
POINT(2389,1934)
POINT(2503,1690)
properties:
feature: 9
id: (none)
geomtype: point
geometry:
POINT(2162,1551)
POINT(2276,1816)
POINT(2389,1934)
POINT(2503,1690)
properties:
feature: 10
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=3](2162 1934,2276 1816,2162 1551)
LINESTRING[count=4](2503 1551,2389 1690,2503 1816,2389 1934)
properties:
feature: 11
id: (none)
geomtype: polygon
geometry:
RING[count=5](2162 1816,2503 1934,2219 1991,2105 1934,2162 1816)[OUTER]
RING[count=4](2389 1816,2162 1551,2560 1551,2389 1816)[OUTER]
properties:
feature: 12
id: (none)
geomtype: polygon
geometry:
RING[count=6](2276 1622,2560 1816,2389 1991,2162 1934,2162 1690,2276 1622)[OUTER]
RING[count=4](2276 1754,2276 1875,2389 1816,2276 1754)[INNER]
RING[count=4](2276 1473,2503 1551,2560 1690,2276 1473)[OUTER]
properties:
feature: 13
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=2](2094 1980,2128 1934)
properties:
feature: 14
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=39](2059 1991,2059 1997,2060 1998,2060 2002,2061 2004,2061 2005,2062 2007,2062 2009,2063 2011,2064 2012,2065 2014,2066 2015,2067 2017,2073 2023,2075 2024,2076 2025,2080 2027,2081 2028,2083 2029,2085 2029,2086 2030,2090 2030,2092 2031,2103 2031,2104 2030,2106 2030,2108 2029,2110 2029,2111 2028,2115 2026,2116 2025,2118 2024,2120 2022,2122 2021,2123 2020,2124 2018,2126 2017,2127 2015,2128 2014)
properties:
feature: 15
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=31](2048 2048,2047 2047,2047 2046,2046 2046,2046 2039,2047 2039,2047 2037,2048 2037,2048 2036,2049 2036,2050 2035,2052 2035,2052 2034,2055 2034,2056 2035,2058 2035,2058 2036,2059 2036,2059 2037,2060 2037,2060 2038,2061 2038,2061 2040,2062 2041,2062 2044,2061 2044,2061 2046,2060 2047,2060 2048,2059 2048,2048 2037)
properties:
feature: 16
id: (none)
geomtype: polygon
geometry:
RING[count=80](2044 2026,2045 2025,2051 2025,2052 2026,2055 2026,2056 2027,2058 2027,2059 2028,2060 2028,2068 2036,2068 2037,2069 2038,2069 2040,2070 2041,2070 2044,2071 2045,2071 2050,2070 2051,2070 2053,2069 2053,2069 2055,2068 2055,2068 2056,2067 2056,2067 2057,2066 2057,2065 2058,2064 2058,2064 2059,2055 2059,2055 2058,2054 2058,2053 2057,2052 2057,2052 2056,2051 2056,2051 2055,2050 2055,2050 2054,2049 2053,2049 2052,2048 2051,2047 2052,2047 2053,2046 2054,2046 2055,2045 2055,2045 2056,2044 2056,2044 2057,2043 2057,2042 2058,2041 2058,2041 2059,2032 2059,2032 2058,2031 2058,2030 2057,2029 2057,2029 2056,2028 2056,2028 2055,2027 2055,2027 2053,2026 2053,2026 2051,2025 2050,2025 2045,2026 2044,2026 2041,2027 2040,2027 2038,2028 2037,2028 2036,2036 2028,2037 2028,2038 2027,2040 2027,2041 2026,2044 2026)[OUTER]
RING[count=5](2048 2037,2037 2048,2048 2042,2059 2048,2048 2037)[INNER]
properties:
feature: 17
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=4](2105 1991,2082 1991,2082 2014,2048 2014)
LINESTRING[count=22](2048 2048,2050 2048,2051 2049,2057 2049,2058 2048,2060 2048,2061 2047,2063 2047,2063 2046,2064 2046,2068 2042,2068 2041,2069 2041,2069 2040,2070 2039,2070 2037,2071 2037,2071 2034,2072 2033,2072 2029,2071 2028,2071 2025)
properties:
feature: 18
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
feature: 19
id: (none)
geomtype: point
geometry:
POINT(2476,1281)
properties:
feature: 20
id: (none)
geomtype: point
geometry:
POINT(2476,1281)
properties:
feature: 21
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
feature: 22
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
feature: 23
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:

Binary file not shown.

View File

@ -0,0 +1,162 @@
=============================================================
layer: 0
name: public.function_source_query_params
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(2048,2048)
properties:
feature: 1
id: (none)
geomtype: point
geometry:
POINT(2025,2025)
properties:
feature: 2
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=2](2048 2048,2059 2037)
properties:
feature: 3
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=2](2071 2025,2082 2014)
properties:
feature: 4
id: (none)
geomtype: point
geometry:
POINT(2389,1934)
properties:
feature: 5
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=3](2389 1934,2162 1690,2503 1551)
properties:
feature: 6
id: (none)
geomtype: polygon
geometry:
RING[count=5](2162 1816,2276 1551,2503 1551,2389 1934,2162 1816)[OUTER]
properties:
feature: 7
id: (none)
geomtype: polygon
geometry:
RING[count=5](2560 1473,2446 1934,2162 1816,2219 1551,2560 1473)[OUTER]
RING[count=4](2446 1622,2276 1690,2389 1816,2446 1622)[INNER]
properties:
feature: 8
id: (none)
geomtype: point
geometry:
POINT(2162,1551)
POINT(2276,1816)
POINT(2389,1934)
POINT(2503,1690)
properties:
feature: 9
id: (none)
geomtype: point
geometry:
POINT(2162,1551)
POINT(2276,1816)
POINT(2389,1934)
POINT(2503,1690)
properties:
feature: 10
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=3](2162 1934,2276 1816,2162 1551)
LINESTRING[count=4](2503 1551,2389 1690,2503 1816,2389 1934)
properties:
feature: 11
id: (none)
geomtype: polygon
geometry:
RING[count=5](2162 1816,2503 1934,2219 1991,2105 1934,2162 1816)[OUTER]
RING[count=4](2389 1816,2162 1551,2560 1551,2389 1816)[OUTER]
properties:
feature: 12
id: (none)
geomtype: polygon
geometry:
RING[count=6](2276 1622,2560 1816,2389 1991,2162 1934,2162 1690,2276 1622)[OUTER]
RING[count=4](2276 1754,2276 1875,2389 1816,2276 1754)[INNER]
RING[count=4](2276 1473,2503 1551,2560 1690,2276 1473)[OUTER]
properties:
feature: 13
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=2](2094 1980,2128 1934)
properties:
feature: 14
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=39](2059 1991,2059 1997,2060 1998,2060 2002,2061 2004,2061 2005,2062 2007,2062 2009,2063 2011,2064 2012,2065 2014,2066 2015,2067 2017,2073 2023,2075 2024,2076 2025,2080 2027,2081 2028,2083 2029,2085 2029,2086 2030,2090 2030,2092 2031,2103 2031,2104 2030,2106 2030,2108 2029,2110 2029,2111 2028,2115 2026,2116 2025,2118 2024,2120 2022,2122 2021,2123 2020,2124 2018,2126 2017,2127 2015,2128 2014)
properties:
feature: 15
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=31](2048 2048,2047 2047,2047 2046,2046 2046,2046 2039,2047 2039,2047 2037,2048 2037,2048 2036,2049 2036,2050 2035,2052 2035,2052 2034,2055 2034,2056 2035,2058 2035,2058 2036,2059 2036,2059 2037,2060 2037,2060 2038,2061 2038,2061 2040,2062 2041,2062 2044,2061 2044,2061 2046,2060 2047,2060 2048,2059 2048,2048 2037)
properties:
feature: 16
id: (none)
geomtype: polygon
geometry:
RING[count=80](2044 2026,2045 2025,2051 2025,2052 2026,2055 2026,2056 2027,2058 2027,2059 2028,2060 2028,2068 2036,2068 2037,2069 2038,2069 2040,2070 2041,2070 2044,2071 2045,2071 2050,2070 2051,2070 2053,2069 2053,2069 2055,2068 2055,2068 2056,2067 2056,2067 2057,2066 2057,2065 2058,2064 2058,2064 2059,2055 2059,2055 2058,2054 2058,2053 2057,2052 2057,2052 2056,2051 2056,2051 2055,2050 2055,2050 2054,2049 2053,2049 2052,2048 2051,2047 2052,2047 2053,2046 2054,2046 2055,2045 2055,2045 2056,2044 2056,2044 2057,2043 2057,2042 2058,2041 2058,2041 2059,2032 2059,2032 2058,2031 2058,2030 2057,2029 2057,2029 2056,2028 2056,2028 2055,2027 2055,2027 2053,2026 2053,2026 2051,2025 2050,2025 2045,2026 2044,2026 2041,2027 2040,2027 2038,2028 2037,2028 2036,2036 2028,2037 2028,2038 2027,2040 2027,2041 2026,2044 2026)[OUTER]
RING[count=5](2048 2037,2037 2048,2048 2042,2059 2048,2048 2037)[INNER]
properties:
feature: 17
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=4](2105 1991,2082 1991,2082 2014,2048 2014)
LINESTRING[count=22](2048 2048,2050 2048,2051 2049,2057 2049,2058 2048,2060 2048,2061 2047,2063 2047,2063 2046,2064 2046,2068 2042,2068 2041,2069 2041,2069 2040,2070 2039,2070 2037,2071 2037,2071 2034,2072 2033,2072 2029,2071 2028,2071 2025)
properties:
feature: 18
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
feature: 19
id: (none)
geomtype: point
geometry:
POINT(2476,1281)
properties:
feature: 20
id: (none)
geomtype: point
geometry:
POINT(2476,1281)
properties:
feature: 21
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
feature: 22
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
feature: 23
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:

View File

@ -0,0 +1,2 @@
S
public.function_source" ì " Ž ²9 "Ô " Æ Š " ö Æ(€ x

View File

@ -0,0 +1,35 @@
=============================================================
layer: 0
name: public.function_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(2,1718)
properties:
feature: 1
id: (none)
geomtype: point
geometry:
POINT(583,3673)
properties:
feature: 2
id: (none)
geomtype: point
geometry:
POINT(1667,1002)
properties:
feature: 3
id: (none)
geomtype: point
geometry:
POINT(803,1477)
properties:
feature: 4
id: (none)
geomtype: point
geometry:
POINT(763,1123)
properties:

View File

@ -0,0 +1,2 @@
H
public.function_source" Ø5 " Ž4ª " Œ”. " ìŽ#(€ x

View File

@ -0,0 +1,29 @@
=============================================================
layer: 0
name: public.function_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(3,3436)
properties:
feature: 1
id: (none)
geomtype: point
geometry:
POINT(3335,2005)
properties:
feature: 2
id: (none)
geomtype: point
geometry:
POINT(1606,2954)
properties:
feature: 3
id: (none)
geomtype: point
geometry:
POINT(1526,2247)
properties:

View File

@ -0,0 +1,2 @@
=
public.function_source" °+ " ˜ " Ø/œ(€ x

View File

@ -0,0 +1,23 @@
=============================================================
layer: 0
name: public.function_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(6,2776)
properties:
feature: 1
id: (none)
geomtype: point
geometry:
POINT(3212,1811)
properties:
feature: 2
id: (none)
geomtype: point
geometry:
POINT(3052,398)
properties:

View File

@ -0,0 +1,2 @@
(
public.function_source " ¸´(€ x

View File

@ -0,0 +1,11 @@
=============================================================
layer: 0
name: public.function_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(412,1562)
properties:

View File

@ -0,0 +1,2 @@
(
public.function_source " î è0(€ x

View File

@ -0,0 +1,11 @@
=============================================================
layer: 0
name: public.function_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(823,3124)
properties:

View File

@ -0,0 +1,2 @@
Z
public.function_source" €,6 " æ+" ,r" ´, " š,." ˜,$(€ x

View File

@ -0,0 +1,41 @@
=============================================================
layer: 0
name: public.function_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(2816,27)
properties:
feature: 1
id: (none)
geomtype: point
geometry:
POINT(2803,73)
properties:
feature: 2
id: (none)
geomtype: point
geometry:
POINT(2825,57)
properties:
feature: 3
id: (none)
geomtype: point
geometry:
POINT(2842,16)
properties:
feature: 4
id: (none)
geomtype: point
geometry:
POINT(2829,23)
properties:
feature: 5
id: (none)
geomtype: point
geometry:
POINT(2828,18)
properties:

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,186 @@
=============================================================
layer: 0
name: public.table_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(2048,2048)
properties:
gid=1
feature: 1
id: (none)
geomtype: point
geometry:
POINT(2025,2025)
properties:
gid=2
feature: 2
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=2](2048 2048,2059 2037)
properties:
gid=3
feature: 3
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=2](2071 2025,2082 2014)
properties:
gid=4
feature: 4
id: (none)
geomtype: point
geometry:
POINT(2389,1934)
properties:
gid=5
feature: 5
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=3](2389 1934,2162 1690,2503 1551)
properties:
gid=6
feature: 6
id: (none)
geomtype: polygon
geometry:
RING[count=5](2162 1816,2276 1551,2503 1551,2389 1934,2162 1816)[OUTER]
properties:
gid=7
feature: 7
id: (none)
geomtype: polygon
geometry:
RING[count=5](2560 1473,2446 1934,2162 1816,2219 1551,2560 1473)[OUTER]
RING[count=4](2446 1622,2276 1690,2389 1816,2446 1622)[INNER]
properties:
gid=8
feature: 8
id: (none)
geomtype: point
geometry:
POINT(2162,1551)
POINT(2276,1816)
POINT(2389,1934)
POINT(2503,1690)
properties:
gid=9
feature: 9
id: (none)
geomtype: point
geometry:
POINT(2162,1551)
POINT(2276,1816)
POINT(2389,1934)
POINT(2503,1690)
properties:
gid=10
feature: 10
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=3](2162 1934,2276 1816,2162 1551)
LINESTRING[count=4](2503 1551,2389 1690,2503 1816,2389 1934)
properties:
gid=11
feature: 11
id: (none)
geomtype: polygon
geometry:
RING[count=5](2162 1816,2503 1934,2219 1991,2105 1934,2162 1816)[OUTER]
RING[count=4](2389 1816,2162 1551,2560 1551,2389 1816)[OUTER]
properties:
gid=12
feature: 12
id: (none)
geomtype: polygon
geometry:
RING[count=6](2276 1622,2560 1816,2389 1991,2162 1934,2162 1690,2276 1622)[OUTER]
RING[count=4](2276 1754,2276 1875,2389 1816,2276 1754)[INNER]
RING[count=4](2276 1473,2503 1551,2560 1690,2276 1473)[OUTER]
properties:
gid=13
feature: 13
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=2](2094 1980,2128 1934)
properties:
gid=14
feature: 14
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=39](2059 1991,2059 1997,2060 1998,2060 2002,2061 2004,2061 2005,2062 2007,2062 2009,2063 2011,2064 2012,2065 2014,2066 2015,2067 2017,2073 2023,2075 2024,2076 2025,2080 2027,2081 2028,2083 2029,2085 2029,2086 2030,2090 2030,2092 2031,2103 2031,2104 2030,2106 2030,2108 2029,2110 2029,2111 2028,2115 2026,2116 2025,2118 2024,2120 2022,2122 2021,2123 2020,2124 2018,2126 2017,2127 2015,2128 2014)
properties:
gid=15
feature: 15
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=31](2048 2048,2047 2047,2047 2046,2046 2046,2046 2039,2047 2039,2047 2037,2048 2037,2048 2036,2049 2036,2050 2035,2052 2035,2052 2034,2055 2034,2056 2035,2058 2035,2058 2036,2059 2036,2059 2037,2060 2037,2060 2038,2061 2038,2061 2040,2062 2041,2062 2044,2061 2044,2061 2046,2060 2047,2060 2048,2059 2048,2048 2037)
properties:
gid=16
feature: 16
id: (none)
geomtype: polygon
geometry:
RING[count=80](2044 2026,2045 2025,2051 2025,2052 2026,2055 2026,2056 2027,2058 2027,2059 2028,2060 2028,2068 2036,2068 2037,2069 2038,2069 2040,2070 2041,2070 2044,2071 2045,2071 2050,2070 2051,2070 2053,2069 2053,2069 2055,2068 2055,2068 2056,2067 2056,2067 2057,2066 2057,2065 2058,2064 2058,2064 2059,2055 2059,2055 2058,2054 2058,2053 2057,2052 2057,2052 2056,2051 2056,2051 2055,2050 2055,2050 2054,2049 2053,2049 2052,2048 2051,2047 2052,2047 2053,2046 2054,2046 2055,2045 2055,2045 2056,2044 2056,2044 2057,2043 2057,2042 2058,2041 2058,2041 2059,2032 2059,2032 2058,2031 2058,2030 2057,2029 2057,2029 2056,2028 2056,2028 2055,2027 2055,2027 2053,2026 2053,2026 2051,2025 2050,2025 2045,2026 2044,2026 2041,2027 2040,2027 2038,2028 2037,2028 2036,2036 2028,2037 2028,2038 2027,2040 2027,2041 2026,2044 2026)[OUTER]
RING[count=5](2048 2037,2037 2048,2048 2042,2059 2048,2048 2037)[INNER]
properties:
gid=17
feature: 17
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=4](2105 1991,2082 1991,2082 2014,2048 2014)
LINESTRING[count=22](2048 2048,2050 2048,2051 2049,2057 2049,2058 2048,2060 2048,2061 2047,2063 2047,2063 2046,2064 2046,2068 2042,2068 2041,2069 2041,2069 2040,2070 2039,2070 2037,2071 2037,2071 2034,2072 2033,2072 2029,2071 2028,2071 2025)
properties:
gid=18
feature: 18
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
gid=19
feature: 19
id: (none)
geomtype: point
geometry:
POINT(2476,1281)
properties:
gid=20
feature: 20
id: (none)
geomtype: point
geometry:
POINT(2476,1281)
properties:
gid=21
feature: 21
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
gid=22
feature: 22
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
gid=23
feature: 23
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
gid=24

Binary file not shown.

View File

@ -0,0 +1,40 @@
=============================================================
layer: 0
name: public.table_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(2,1718)
properties:
gid=19
feature: 1
id: (none)
geomtype: point
geometry:
POINT(583,3673)
properties:
gid=21
feature: 2
id: (none)
geomtype: point
geometry:
POINT(1667,1002)
properties:
gid=22
feature: 3
id: (none)
geomtype: point
geometry:
POINT(803,1477)
properties:
gid=23
feature: 4
id: (none)
geomtype: point
geometry:
POINT(763,1123)
properties:
gid=24

Binary file not shown.

View File

@ -0,0 +1,33 @@
=============================================================
layer: 0
name: public.table_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(3,3436)
properties:
gid=19
feature: 1
id: (none)
geomtype: point
geometry:
POINT(3335,2005)
properties:
gid=22
feature: 2
id: (none)
geomtype: point
geometry:
POINT(1606,2954)
properties:
gid=23
feature: 3
id: (none)
geomtype: point
geometry:
POINT(1526,2247)
properties:
gid=24

Binary file not shown.

View File

@ -0,0 +1,26 @@
=============================================================
layer: 0
name: public.table_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(6,2776)
properties:
gid=19
feature: 1
id: (none)
geomtype: point
geometry:
POINT(3212,1811)
properties:
gid=23
feature: 2
id: (none)
geomtype: point
geometry:
POINT(3052,398)
properties:
gid=24

Binary file not shown.

View File

@ -0,0 +1,12 @@
=============================================================
layer: 0
name: public.table_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(412,1562)
properties:
gid=19

Binary file not shown.

View File

@ -0,0 +1,12 @@
=============================================================
layer: 0
name: public.table_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(823,3124)
properties:
gid=19

Binary file not shown.

View File

@ -0,0 +1,47 @@
=============================================================
layer: 0
name: public.table_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(2816,27)
properties:
gid=19
feature: 1
id: (none)
geomtype: point
geometry:
POINT(2803,73)
properties:
gid=20
feature: 2
id: (none)
geomtype: point
geometry:
POINT(2825,57)
properties:
gid=21
feature: 3
id: (none)
geomtype: point
geometry:
POINT(2842,16)
properties:
gid=22
feature: 4
id: (none)
geomtype: point
geometry:
POINT(2829,23)
properties:
gid=23
feature: 5
id: (none)
geomtype: point
geometry:
POINT(2828,18)
properties:
gid=24

View File

@ -0,0 +1,90 @@
{
"public.points1": {
"bounds": [
-180,
-90,
180,
90
],
"buffer": 64,
"clip_geom": true,
"extent": 4096,
"geometry_column": "geom",
"geometry_type": "GEOMETRY",
"id": "public.points1",
"maxzoom": 30,
"minzoom": 0,
"properties": {
"gid": "int4"
},
"schema": "public",
"srid": 4326,
"table": "points1"
},
"public.points2": {
"bounds": [
-180,
-90,
180,
90
],
"buffer": 64,
"clip_geom": true,
"extent": 4096,
"geometry_column": "geom",
"geometry_type": "GEOMETRY",
"id": "public.points2",
"maxzoom": 30,
"minzoom": 0,
"properties": {
"gid": "int4"
},
"schema": "public",
"srid": 4326,
"table": "points2"
},
"public.points3857": {
"bounds": [
-180,
-90,
180,
90
],
"buffer": 64,
"clip_geom": true,
"extent": 4096,
"geometry_column": "geom",
"geometry_type": "GEOMETRY",
"id": "public.points3857",
"maxzoom": 30,
"minzoom": 0,
"properties": {
"gid": "int4"
},
"schema": "public",
"srid": 3857,
"table": "points3857"
},
"public.table_source": {
"bounds": [
-180,
-90,
180,
90
],
"buffer": 64,
"clip_geom": true,
"extent": 4096,
"geometry_column": "geom",
"geometry_type": "GEOMETRY",
"id": "public.table_source",
"maxzoom": 30,
"minzoom": 0,
"properties": {
"gid": "int4"
},
"schema": "public",
"srid": 4326,
"table": "table_source"
}
}

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,162 @@
=============================================================
layer: 0
name: public.function_source_query_params
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(2048,2048)
properties:
feature: 1
id: (none)
geomtype: point
geometry:
POINT(2025,2025)
properties:
feature: 2
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=2](2048 2048,2059 2037)
properties:
feature: 3
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=2](2071 2025,2082 2014)
properties:
feature: 4
id: (none)
geomtype: point
geometry:
POINT(2389,1934)
properties:
feature: 5
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=3](2389 1934,2162 1690,2503 1551)
properties:
feature: 6
id: (none)
geomtype: polygon
geometry:
RING[count=5](2162 1816,2276 1551,2503 1551,2389 1934,2162 1816)[OUTER]
properties:
feature: 7
id: (none)
geomtype: polygon
geometry:
RING[count=5](2560 1473,2446 1934,2162 1816,2219 1551,2560 1473)[OUTER]
RING[count=4](2446 1622,2276 1690,2389 1816,2446 1622)[INNER]
properties:
feature: 8
id: (none)
geomtype: point
geometry:
POINT(2162,1551)
POINT(2276,1816)
POINT(2389,1934)
POINT(2503,1690)
properties:
feature: 9
id: (none)
geomtype: point
geometry:
POINT(2162,1551)
POINT(2276,1816)
POINT(2389,1934)
POINT(2503,1690)
properties:
feature: 10
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=3](2162 1934,2276 1816,2162 1551)
LINESTRING[count=4](2503 1551,2389 1690,2503 1816,2389 1934)
properties:
feature: 11
id: (none)
geomtype: polygon
geometry:
RING[count=5](2162 1816,2503 1934,2219 1991,2105 1934,2162 1816)[OUTER]
RING[count=4](2389 1816,2162 1551,2560 1551,2389 1816)[OUTER]
properties:
feature: 12
id: (none)
geomtype: polygon
geometry:
RING[count=6](2276 1622,2560 1816,2389 1991,2162 1934,2162 1690,2276 1622)[OUTER]
RING[count=4](2276 1754,2276 1875,2389 1816,2276 1754)[INNER]
RING[count=4](2276 1473,2503 1551,2560 1690,2276 1473)[OUTER]
properties:
feature: 13
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=2](2094 1980,2128 1934)
properties:
feature: 14
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=39](2059 1991,2059 1997,2060 1998,2060 2002,2061 2004,2061 2005,2062 2007,2062 2009,2063 2011,2064 2012,2065 2014,2066 2015,2067 2017,2073 2023,2075 2024,2076 2025,2080 2027,2081 2028,2083 2029,2085 2029,2086 2030,2090 2030,2092 2031,2103 2031,2104 2030,2106 2030,2108 2029,2110 2029,2111 2028,2115 2026,2116 2025,2118 2024,2120 2022,2122 2021,2123 2020,2124 2018,2126 2017,2127 2015,2128 2014)
properties:
feature: 15
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=31](2048 2048,2047 2047,2047 2046,2046 2046,2046 2039,2047 2039,2047 2037,2048 2037,2048 2036,2049 2036,2050 2035,2052 2035,2052 2034,2055 2034,2056 2035,2058 2035,2058 2036,2059 2036,2059 2037,2060 2037,2060 2038,2061 2038,2061 2040,2062 2041,2062 2044,2061 2044,2061 2046,2060 2047,2060 2048,2059 2048,2048 2037)
properties:
feature: 16
id: (none)
geomtype: polygon
geometry:
RING[count=80](2044 2026,2045 2025,2051 2025,2052 2026,2055 2026,2056 2027,2058 2027,2059 2028,2060 2028,2068 2036,2068 2037,2069 2038,2069 2040,2070 2041,2070 2044,2071 2045,2071 2050,2070 2051,2070 2053,2069 2053,2069 2055,2068 2055,2068 2056,2067 2056,2067 2057,2066 2057,2065 2058,2064 2058,2064 2059,2055 2059,2055 2058,2054 2058,2053 2057,2052 2057,2052 2056,2051 2056,2051 2055,2050 2055,2050 2054,2049 2053,2049 2052,2048 2051,2047 2052,2047 2053,2046 2054,2046 2055,2045 2055,2045 2056,2044 2056,2044 2057,2043 2057,2042 2058,2041 2058,2041 2059,2032 2059,2032 2058,2031 2058,2030 2057,2029 2057,2029 2056,2028 2056,2028 2055,2027 2055,2027 2053,2026 2053,2026 2051,2025 2050,2025 2045,2026 2044,2026 2041,2027 2040,2027 2038,2028 2037,2028 2036,2036 2028,2037 2028,2038 2027,2040 2027,2041 2026,2044 2026)[OUTER]
RING[count=5](2048 2037,2037 2048,2048 2042,2059 2048,2048 2037)[INNER]
properties:
feature: 17
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=4](2105 1991,2082 1991,2082 2014,2048 2014)
LINESTRING[count=22](2048 2048,2050 2048,2051 2049,2057 2049,2058 2048,2060 2048,2061 2047,2063 2047,2063 2046,2064 2046,2068 2042,2068 2041,2069 2041,2069 2040,2070 2039,2070 2037,2071 2037,2071 2034,2072 2033,2072 2029,2071 2028,2071 2025)
properties:
feature: 18
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
feature: 19
id: (none)
geomtype: point
geometry:
POINT(2476,1281)
properties:
feature: 20
id: (none)
geomtype: point
geometry:
POINT(2476,1281)
properties:
feature: 21
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
feature: 22
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
feature: 23
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:

Binary file not shown.

View File

@ -0,0 +1,162 @@
=============================================================
layer: 0
name: public.function_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(2048,2048)
properties:
feature: 1
id: (none)
geomtype: point
geometry:
POINT(2025,2025)
properties:
feature: 2
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=2](2048 2048,2059 2037)
properties:
feature: 3
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=2](2071 2025,2082 2014)
properties:
feature: 4
id: (none)
geomtype: point
geometry:
POINT(2389,1934)
properties:
feature: 5
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=3](2389 1934,2162 1690,2503 1551)
properties:
feature: 6
id: (none)
geomtype: polygon
geometry:
RING[count=5](2162 1816,2276 1551,2503 1551,2389 1934,2162 1816)[OUTER]
properties:
feature: 7
id: (none)
geomtype: polygon
geometry:
RING[count=5](2560 1473,2446 1934,2162 1816,2219 1551,2560 1473)[OUTER]
RING[count=4](2446 1622,2276 1690,2389 1816,2446 1622)[INNER]
properties:
feature: 8
id: (none)
geomtype: point
geometry:
POINT(2162,1551)
POINT(2276,1816)
POINT(2389,1934)
POINT(2503,1690)
properties:
feature: 9
id: (none)
geomtype: point
geometry:
POINT(2162,1551)
POINT(2276,1816)
POINT(2389,1934)
POINT(2503,1690)
properties:
feature: 10
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=3](2162 1934,2276 1816,2162 1551)
LINESTRING[count=4](2503 1551,2389 1690,2503 1816,2389 1934)
properties:
feature: 11
id: (none)
geomtype: polygon
geometry:
RING[count=5](2162 1816,2503 1934,2219 1991,2105 1934,2162 1816)[OUTER]
RING[count=4](2389 1816,2162 1551,2560 1551,2389 1816)[OUTER]
properties:
feature: 12
id: (none)
geomtype: polygon
geometry:
RING[count=6](2276 1622,2560 1816,2389 1991,2162 1934,2162 1690,2276 1622)[OUTER]
RING[count=4](2276 1754,2276 1875,2389 1816,2276 1754)[INNER]
RING[count=4](2276 1473,2503 1551,2560 1690,2276 1473)[OUTER]
properties:
feature: 13
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=2](2094 1980,2128 1934)
properties:
feature: 14
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=39](2059 1991,2059 1997,2060 1998,2060 2002,2061 2004,2061 2005,2062 2007,2062 2009,2063 2011,2064 2012,2065 2014,2066 2015,2067 2017,2073 2023,2075 2024,2076 2025,2080 2027,2081 2028,2083 2029,2085 2029,2086 2030,2090 2030,2092 2031,2103 2031,2104 2030,2106 2030,2108 2029,2110 2029,2111 2028,2115 2026,2116 2025,2118 2024,2120 2022,2122 2021,2123 2020,2124 2018,2126 2017,2127 2015,2128 2014)
properties:
feature: 15
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=31](2048 2048,2047 2047,2047 2046,2046 2046,2046 2039,2047 2039,2047 2037,2048 2037,2048 2036,2049 2036,2050 2035,2052 2035,2052 2034,2055 2034,2056 2035,2058 2035,2058 2036,2059 2036,2059 2037,2060 2037,2060 2038,2061 2038,2061 2040,2062 2041,2062 2044,2061 2044,2061 2046,2060 2047,2060 2048,2059 2048,2048 2037)
properties:
feature: 16
id: (none)
geomtype: polygon
geometry:
RING[count=80](2044 2026,2045 2025,2051 2025,2052 2026,2055 2026,2056 2027,2058 2027,2059 2028,2060 2028,2068 2036,2068 2037,2069 2038,2069 2040,2070 2041,2070 2044,2071 2045,2071 2050,2070 2051,2070 2053,2069 2053,2069 2055,2068 2055,2068 2056,2067 2056,2067 2057,2066 2057,2065 2058,2064 2058,2064 2059,2055 2059,2055 2058,2054 2058,2053 2057,2052 2057,2052 2056,2051 2056,2051 2055,2050 2055,2050 2054,2049 2053,2049 2052,2048 2051,2047 2052,2047 2053,2046 2054,2046 2055,2045 2055,2045 2056,2044 2056,2044 2057,2043 2057,2042 2058,2041 2058,2041 2059,2032 2059,2032 2058,2031 2058,2030 2057,2029 2057,2029 2056,2028 2056,2028 2055,2027 2055,2027 2053,2026 2053,2026 2051,2025 2050,2025 2045,2026 2044,2026 2041,2027 2040,2027 2038,2028 2037,2028 2036,2036 2028,2037 2028,2038 2027,2040 2027,2041 2026,2044 2026)[OUTER]
RING[count=5](2048 2037,2037 2048,2048 2042,2059 2048,2048 2037)[INNER]
properties:
feature: 17
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=4](2105 1991,2082 1991,2082 2014,2048 2014)
LINESTRING[count=22](2048 2048,2050 2048,2051 2049,2057 2049,2058 2048,2060 2048,2061 2047,2063 2047,2063 2046,2064 2046,2068 2042,2068 2041,2069 2041,2069 2040,2070 2039,2070 2037,2071 2037,2071 2034,2072 2033,2072 2029,2071 2028,2071 2025)
properties:
feature: 18
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
feature: 19
id: (none)
geomtype: point
geometry:
POINT(2476,1281)
properties:
feature: 20
id: (none)
geomtype: point
geometry:
POINT(2476,1281)
properties:
feature: 21
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
feature: 22
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
feature: 23
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:

Binary file not shown.

View File

@ -0,0 +1,186 @@
=============================================================
layer: 0
name: public.table_source
version: 2
extent: 4096
feature: 0
id: (none)
geomtype: point
geometry:
POINT(2048,2048)
properties:
gid=1
feature: 1
id: (none)
geomtype: point
geometry:
POINT(2025,2025)
properties:
gid=2
feature: 2
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=2](2048 2048,2059 2037)
properties:
gid=3
feature: 3
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=2](2071 2025,2082 2014)
properties:
gid=4
feature: 4
id: (none)
geomtype: point
geometry:
POINT(2389,1934)
properties:
gid=5
feature: 5
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=3](2389 1934,2162 1690,2503 1551)
properties:
gid=6
feature: 6
id: (none)
geomtype: polygon
geometry:
RING[count=5](2162 1816,2276 1551,2503 1551,2389 1934,2162 1816)[OUTER]
properties:
gid=7
feature: 7
id: (none)
geomtype: polygon
geometry:
RING[count=5](2560 1473,2446 1934,2162 1816,2219 1551,2560 1473)[OUTER]
RING[count=4](2446 1622,2276 1690,2389 1816,2446 1622)[INNER]
properties:
gid=8
feature: 8
id: (none)
geomtype: point
geometry:
POINT(2162,1551)
POINT(2276,1816)
POINT(2389,1934)
POINT(2503,1690)
properties:
gid=9
feature: 9
id: (none)
geomtype: point
geometry:
POINT(2162,1551)
POINT(2276,1816)
POINT(2389,1934)
POINT(2503,1690)
properties:
gid=10
feature: 10
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=3](2162 1934,2276 1816,2162 1551)
LINESTRING[count=4](2503 1551,2389 1690,2503 1816,2389 1934)
properties:
gid=11
feature: 11
id: (none)
geomtype: polygon
geometry:
RING[count=5](2162 1816,2503 1934,2219 1991,2105 1934,2162 1816)[OUTER]
RING[count=4](2389 1816,2162 1551,2560 1551,2389 1816)[OUTER]
properties:
gid=12
feature: 12
id: (none)
geomtype: polygon
geometry:
RING[count=6](2276 1622,2560 1816,2389 1991,2162 1934,2162 1690,2276 1622)[OUTER]
RING[count=4](2276 1754,2276 1875,2389 1816,2276 1754)[INNER]
RING[count=4](2276 1473,2503 1551,2560 1690,2276 1473)[OUTER]
properties:
gid=13
feature: 13
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=2](2094 1980,2128 1934)
properties:
gid=14
feature: 14
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=39](2059 1991,2059 1997,2060 1998,2060 2002,2061 2004,2061 2005,2062 2007,2062 2009,2063 2011,2064 2012,2065 2014,2066 2015,2067 2017,2073 2023,2075 2024,2076 2025,2080 2027,2081 2028,2083 2029,2085 2029,2086 2030,2090 2030,2092 2031,2103 2031,2104 2030,2106 2030,2108 2029,2110 2029,2111 2028,2115 2026,2116 2025,2118 2024,2120 2022,2122 2021,2123 2020,2124 2018,2126 2017,2127 2015,2128 2014)
properties:
gid=15
feature: 15
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=31](2048 2048,2047 2047,2047 2046,2046 2046,2046 2039,2047 2039,2047 2037,2048 2037,2048 2036,2049 2036,2050 2035,2052 2035,2052 2034,2055 2034,2056 2035,2058 2035,2058 2036,2059 2036,2059 2037,2060 2037,2060 2038,2061 2038,2061 2040,2062 2041,2062 2044,2061 2044,2061 2046,2060 2047,2060 2048,2059 2048,2048 2037)
properties:
gid=16
feature: 16
id: (none)
geomtype: polygon
geometry:
RING[count=80](2044 2026,2045 2025,2051 2025,2052 2026,2055 2026,2056 2027,2058 2027,2059 2028,2060 2028,2068 2036,2068 2037,2069 2038,2069 2040,2070 2041,2070 2044,2071 2045,2071 2050,2070 2051,2070 2053,2069 2053,2069 2055,2068 2055,2068 2056,2067 2056,2067 2057,2066 2057,2065 2058,2064 2058,2064 2059,2055 2059,2055 2058,2054 2058,2053 2057,2052 2057,2052 2056,2051 2056,2051 2055,2050 2055,2050 2054,2049 2053,2049 2052,2048 2051,2047 2052,2047 2053,2046 2054,2046 2055,2045 2055,2045 2056,2044 2056,2044 2057,2043 2057,2042 2058,2041 2058,2041 2059,2032 2059,2032 2058,2031 2058,2030 2057,2029 2057,2029 2056,2028 2056,2028 2055,2027 2055,2027 2053,2026 2053,2026 2051,2025 2050,2025 2045,2026 2044,2026 2041,2027 2040,2027 2038,2028 2037,2028 2036,2036 2028,2037 2028,2038 2027,2040 2027,2041 2026,2044 2026)[OUTER]
RING[count=5](2048 2037,2037 2048,2048 2042,2059 2048,2048 2037)[INNER]
properties:
gid=17
feature: 17
id: (none)
geomtype: linestring
geometry:
LINESTRING[count=4](2105 1991,2082 1991,2082 2014,2048 2014)
LINESTRING[count=22](2048 2048,2050 2048,2051 2049,2057 2049,2058 2048,2060 2048,2061 2047,2063 2047,2063 2046,2064 2046,2068 2042,2068 2041,2069 2041,2069 2040,2070 2039,2070 2037,2071 2037,2071 2034,2072 2033,2072 2029,2071 2028,2071 2025)
properties:
gid=18
feature: 18
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
gid=19
feature: 19
id: (none)
geomtype: point
geometry:
POINT(2476,1281)
properties:
gid=20
feature: 20
id: (none)
geomtype: point
geometry:
POINT(2476,1281)
properties:
gid=21
feature: 21
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
gid=22
feature: 22
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
gid=23
feature: 23
id: (none)
geomtype: point
geometry:
POINT(2476,1280)
properties:
gid=24

View File

@ -1,17 +1,20 @@
#!/usr/bin/env sh
set -e
#!/usr/bin/env bash
set -euo pipefail
FIXTURES_DIR="$(dirname "$0")"
echo "Loading Martin test fixtures into '$PGDATABASE' as user '$PGUSER' from '$FIXTURES_DIR'"
env
psql -v ON_ERROR_STOP=1 -f $FIXTURES_DIR/TileBBox.sql
psql -v ON_ERROR_STOP=1 -f $FIXTURES_DIR/table_source.sql
psql -v ON_ERROR_STOP=1 -f $FIXTURES_DIR/table_source_multiple_geom.sql
psql -v ON_ERROR_STOP=1 -f $FIXTURES_DIR/function_source.sql
psql -v ON_ERROR_STOP=1 -f $FIXTURES_DIR/function_source_query_params.sql
psql -v ON_ERROR_STOP=1 -f $FIXTURES_DIR/points1_source.sql
psql -v ON_ERROR_STOP=1 -f $FIXTURES_DIR/points2_source.sql
psql -v ON_ERROR_STOP=1 -f $FIXTURES_DIR/points3857_source.sql
psql -v ON_ERROR_STOP=1 -f $FIXTURES_DIR/points_empty_srid_source.sql
psql -P pager=off -v ON_ERROR_STOP=1 -c "CREATE EXTENSION IF NOT EXISTS postgis;"
psql -P pager=off -v ON_ERROR_STOP=1 -t -c "select version();"
psql -P pager=off -v ON_ERROR_STOP=1 -t -c "select PostGIS_Full_Version();"
psql -e -P pager=off -v ON_ERROR_STOP=1 -f $FIXTURES_DIR/TileBBox.sql
psql -e -P pager=off -v ON_ERROR_STOP=1 -f $FIXTURES_DIR/table_source.sql
psql -e -P pager=off -v ON_ERROR_STOP=1 -f $FIXTURES_DIR/table_source_multiple_geom.sql
psql -e -P pager=off -v ON_ERROR_STOP=1 -f $FIXTURES_DIR/function_source.sql
psql -e -P pager=off -v ON_ERROR_STOP=1 -f $FIXTURES_DIR/function_source_query_params.sql
psql -e -P pager=off -v ON_ERROR_STOP=1 -f $FIXTURES_DIR/points1_source.sql
psql -e -P pager=off -v ON_ERROR_STOP=1 -f $FIXTURES_DIR/points2_source.sql
psql -e -P pager=off -v ON_ERROR_STOP=1 -f $FIXTURES_DIR/points3857_source.sql
psql -e -P pager=off -v ON_ERROR_STOP=1 -f $FIXTURES_DIR/points_empty_srid_source.sql

View File

@ -1,90 +1,54 @@
#!/usr/bin/env bash
set -euo pipefail
>&2 echo "Test server response for table source"
TEST_OUT_DIR="$(dirname "$0")/output/auto"
mkdir -p "$TEST_OUT_DIR"
curl -sS "localhost:3000/index.json" | jq -e
curl -sS "localhost:3000/public.table_source/0/0/0.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/public.table_source/6/38/20.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/public.table_source/12/2476/1280.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/public.table_source/13/4952/2560.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/public.table_source/14/9904/5121.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/public.table_source/20/633856/327787.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/public.table_source/21/1267712/655574.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
test_pbf()
{
FILENAME="$TEST_OUT_DIR/$1.pbf"
URL=$2
echo "Testing $(basename "$FILENAME") from $URL"
curl -sS "$URL" > "$FILENAME"
./tests/vtzero-check "$FILENAME"
./tests/vtzero-show "$FILENAME" > "$FILENAME.txt"
}
>&2 echo "Test catalog"
curl -sS "localhost:3000/index.json" | jq --sort-keys -e > "$TEST_OUT_DIR/catalog.json"
>&2 echo "Test server response for table source"
test_pbf "tbl_0_0_0" "localhost:3000/public.table_source/0/0/0.pbf"
test_pbf "tbl_6_38_20" "localhost:3000/public.table_source/6/38/20.pbf"
test_pbf "tbl_12_2476_1280" "localhost:3000/public.table_source/12/2476/1280.pbf"
test_pbf "tbl_13_4952_2560" "localhost:3000/public.table_source/13/4952/2560.pbf"
test_pbf "tbl_14_9904_5121" "localhost:3000/public.table_source/14/9904/5121.pbf"
test_pbf "tbl_20_633856_327787" "localhost:3000/public.table_source/20/633856/327787.pbf"
test_pbf "tbl_21_1267712_655574" "localhost:3000/public.table_source/21/1267712/655574.pbf"
>&2 echo "Test server response for composite source"
curl -sS "localhost:3000/public.table_source,public.points1,public.points2/0/0/0.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/public.table_source,public.points1,public.points2/6/38/20.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/public.table_source,public.points1,public.points2/12/2476/1280.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/public.table_source,public.points1,public.points2/13/4952/2560.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/public.table_source,public.points1,public.points2/14/9904/5121.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/public.table_source,public.points1,public.points2/20/633856/327787.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/public.table_source,public.points1,public.points2/21/1267712/655574.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
test_pbf "cmp_0_0_0" "localhost:3000/public.table_source,public.points1,public.points2/0/0/0.pbf"
test_pbf "cmp_6_38_20" "localhost:3000/public.table_source,public.points1,public.points2/6/38/20.pbf"
test_pbf "cmp_12_2476_1280" "localhost:3000/public.table_source,public.points1,public.points2/12/2476/1280.pbf"
test_pbf "cmp_13_4952_2560" "localhost:3000/public.table_source,public.points1,public.points2/13/4952/2560.pbf"
test_pbf "cmp_14_9904_5121" "localhost:3000/public.table_source,public.points1,public.points2/14/9904/5121.pbf"
test_pbf "cmp_20_633856_327787" "localhost:3000/public.table_source,public.points1,public.points2/20/633856/327787.pbf"
test_pbf "cmp_21_1267712_655574" "localhost:3000/public.table_source,public.points1,public.points2/21/1267712/655574.pbf"
>&2 echo "Test server response for function source"
curl -sS "localhost:3000/rpc/public.function_source/0/0/0.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/rpc/public.function_source/6/38/20.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/rpc/public.function_source/12/2476/1280.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/rpc/public.function_source/13/4952/2560.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/rpc/public.function_source/14/9904/5121.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/rpc/public.function_source/20/633856/327787.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/rpc/public.function_source/21/1267712/655574.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/rpc/public.function_source_query_params/0/0/0.pbf?token=martin" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
test_pbf "fnc_0_0_0" "localhost:3000/rpc/public.function_source/0/0/0.pbf"
test_pbf "fnc_6_38_20" "localhost:3000/rpc/public.function_source/6/38/20.pbf"
test_pbf "fnc_12_2476_1280" "localhost:3000/rpc/public.function_source/12/2476/1280.pbf"
test_pbf "fnc_13_4952_2560" "localhost:3000/rpc/public.function_source/13/4952/2560.pbf"
test_pbf "fnc_14_9904_5121" "localhost:3000/rpc/public.function_source/14/9904/5121.pbf"
test_pbf "fnc_20_633856_327787" "localhost:3000/rpc/public.function_source/20/633856/327787.pbf"
test_pbf "fnc_21_1267712_655574" "localhost:3000/rpc/public.function_source/21/1267712/655574.pbf"
test_pbf "fnc_0_0_0_token" "localhost:3000/rpc/public.function_source_query_params/0/0/0.pbf?token=martin"
>&2 echo "Test server response for table source with different SRID"
curl -sS "localhost:3000/public.points3857/0/0/0.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
test_pbf "points3857_srid_0_0_0" "localhost:3000/public.points3857/0/0/0.pbf"
>&2 echo "Test server response for table source with empty SRID"
curl -sS "localhost:3000/public.points_empty_srid/0/0/0.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
echo "IGNORING: This test is currently failing, and has been failing for a while"
echo "IGNORING: " test_pbf "points_empty_srid_0_0_0" "localhost:3000/public.points_empty_srid/0/0/0.pbf"

View File

@ -1,16 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
curl -sS "localhost:3000/index.json" | jq -e
curl -sS "localhost:3000/public.table_source/0/0/0.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/public.points1,public.points2/0/0/0.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/rpc/public.function_source/0/0/0.pbf" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
curl -sS "localhost:3000/rpc/public.function_source_query_params/0/0/0.pbf?token=martin" > tmp.pbf
./tests/vtzero-check tmp.pbf
./tests/vtzero-show tmp.pbf
TEST_OUT_DIR="$(dirname "$0")/output/configured"
mkdir -p "$TEST_OUT_DIR"
test_pbf()
{
FILENAME="$TEST_OUT_DIR/$1"
URL=$2
echo "Testing $(basename "$FILENAME") from $URL"
curl -sS "$URL" > "$FILENAME"
./tests/vtzero-check "$FILENAME"
./tests/vtzero-show "$FILENAME" > "$FILENAME.txt"
}
curl -sS "localhost:3000/index.json" | jq --sort-keys -e > "$TEST_OUT_DIR/catalog.json"
test_pbf "tbl_0_0_0" "localhost:3000/public.table_source/0/0/0.pbf"
test_pbf "cmp_0_0_0" "localhost:3000/public.points1,public.points2/0/0/0.pbf"
test_pbf "fnc_0_0_0" "localhost:3000/rpc/public.function_source/0/0/0.pbf"
test_pbf "fnc2_0_0_0" "localhost:3000/rpc/public.function_source_query_params/0/0/0.pbf?token=martin"

35
tests/test.sh Executable file
View File

@ -0,0 +1,35 @@
#!/usr/bin/env bash
set -euo pipefail
DATABASE_URL="${DATABASE_URL:-postgres://postgres@localhost/db}"
MARTIN_BIN="${MARTIN_BIN:-cargo run --}"
function wait_for_martin {
# Seems the --retry-all-errors option is not available on older curl versions, but maybe in the future we can just use this:
# timeout -k 20s 20s curl --retry 10 --retry-all-errors --retry-delay 1 -sS http://localhost:3000/healthz
echo "Waiting for Martin to start..."
n=0
until [ "$n" -ge 100 ]; do
timeout -k 20s 20s curl -sSf http://localhost:3000/healthz 2>/dev/null >/dev/null && break
n=$((n+1))
sleep 0.2
done
echo "Martin has started."
}
curl --version
$MARTIN_BIN --default-srid 900913 &
PROCESS_ID=$!
trap "kill $PROCESS_ID || true" EXIT
wait_for_martin
tests/test-auto-sources.sh
kill $PROCESS_ID
$MARTIN_BIN --config tests/config.yaml "$DATABASE_URL" &
PROCESS_ID=$!
trap "kill $PROCESS_ID || true" EXIT
wait_for_martin
tests/test-configured-sources.sh
kill $PROCESS_ID