EOX GitLab Instance
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ESA
PRISM
VS
Commits
1420653d
Commit
1420653d
authored
5 years ago
by
Fabian Schindler
Browse files
Options
Downloads
Patches
Plain Diff
Creat database views for mapcache items
Allows smaller queries in tilesets
parent
29bdbfc7
No related branches found
No related tags found
1 merge request
!6
Cache native swift
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
cache/Dockerfile
+1
-0
1 addition, 0 deletions
cache/Dockerfile
cache/configure.sh
+3
-2
3 additions, 2 deletions
cache/configure.sh
cache/install.sh
+1
-1
1 addition, 1 deletion
cache/install.sh
cache/mapcache_items_view.sql
+14
-0
14 additions, 0 deletions
cache/mapcache_items_view.sql
with
19 additions
and
3 deletions
cache/Dockerfile
+
1
−
0
View file @
1420653d
...
...
@@ -64,6 +64,7 @@ ADD configure.sh \
seeder.py \
mapcache-template.xml \
entrypoint.sh \
mapcache_items_view.sql \
/
RUN
chmod
-v
+x
\
...
...
This diff is collapsed.
Click to expand it.
cache/configure.sh
+
3
−
2
View file @
1420653d
...
...
@@ -108,5 +108,6 @@ else
echo
"Using existing index.html"
fi
echo
"Store environment variables for cron."
env
>
/etc/environment
# create a database view for the mapcache items
echo
"Creating database view for mapcache items"
psql
"host=
${
DB_HOST
}
user=
${
DB_USER
}
password=
${
DB_PW
}
dbname=
${
DB_NAME
}
port=
${
DB_PORT
}
"
-f
/mapcache_items_view.sql
This diff is collapsed.
Click to expand it.
cache/install.sh
+
1
−
1
View file @
1420653d
...
...
@@ -13,6 +13,6 @@ echo "Installing packages"
VERSION
=
1.8.0-1~bionic1eox5
DEBIAN_FRONTEND
=
noninteractive apt
install
-y
\
libmapcache1
=
${
VERSION
}
libapache2-mod-mapcache
=
${
VERSION
}
mapcache-tools
=
${
VERSION
}
\
sqlite3 curl apache2 python3-dateutil python3-redis wait-for-it
sqlite3 curl apache2 python3-dateutil python3-redis wait-for-it
postgresql-client
rm
-rf
/var/lib/apt/lists/
*
This diff is collapsed.
Click to expand it.
cache/mapcache_items_view.sql
0 → 100644
+
14
−
0
View file @
1420653d
CREATE
OR
REPLACE
VIEW
mapcache_items
AS
SELECT
product_eoobject
.
"begin_time"
AS
"begin_time"
,
product_eoobject
.
"end_time"
AS
"end_time"
,
product_eoobject
.
"footprint"
AS
"footprint"
,
CONCAT
(
to_char
(
product_eoobject
.
"begin_time"
,
'YYYY-MM-DD"T"HH24:MI:SS"Z"'
),
CONCAT
(
'/'
,
to_char
(
product_eoobject
.
"end_time"
,
'YYYY-MM-DD"T"HH24:MI:SS"Z"'
)))
AS
"interval"
,
collection_eoobject
.
identifier
AS
"collection"
FROM
"coverages_product"
INNER
JOIN
"coverages_product_collections"
ON
(
"coverages_product"
.
"eoobject_ptr_id"
=
"coverages_product_collections"
.
"product_id"
)
INNER
JOIN
"coverages_collection"
collection
ON
(
"coverages_product_collections"
.
"collection_id"
=
collection
.
"eoobject_ptr_id"
)
INNER
JOIN
"coverages_eoobject"
ON
(
collection
.
"eoobject_ptr_id"
=
"coverages_eoobject"
.
"id"
)
INNER
JOIN
"coverages_eoobject"
product_eoobject
ON
(
"coverages_product"
.
"eoobject_ptr_id"
=
product_eoobject
.
"id"
)
INNER
JOIN
"coverages_eoobject"
collection_eoobject
ON
(
collection
.
"eoobject_ptr_id"
=
collection_eoobject
.
"id"
)
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment