Skip to content

Commit

Permalink
Merge branch 'master' of github.com:EOxServer/eoxserver
Browse files Browse the repository at this point in the history
  • Loading branch information
baloola committed Dec 16, 2022
2 parents 8da0605 + ef73e29 commit f732eb4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.1.4-dev15
current_version = 1.1.4-dev16
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
Expand Down
2 changes: 1 addition & 1 deletion docker/eoxserver-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ fi
cd "${INSTANCE_DIR}"

# run the initial command
exec $@
exec "$@"
2 changes: 1 addition & 1 deletion docker/ubuntu/py3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ EXPOSE 8000

ENTRYPOINT ["/opt/eoxserver/eoxserver-entrypoint.sh"]

CMD ["gunicorn", "$GUNICORN_CMD_ARGS"]
CMD "gunicorn" $GUNICORN_CMD_ARGS
2 changes: 1 addition & 1 deletion eoxserver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# ------------------------------------------------------------------------------


__version__ = '1.1.4-dev15'
__version__ = '1.1.4-dev16'


def get_version():
Expand Down
15 changes: 12 additions & 3 deletions eoxserver/resources/coverages/registration/stac.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@

from itertools import zip_longest
import json
from urllib.parse import urljoin, urlparse, urlunparse
from urllib.parse import (
urljoin, urlparse, urlunparse, uses_netloc, uses_relative
)
import logging

from django.contrib.gis.geos import GEOSGeometry
Expand Down Expand Up @@ -98,6 +100,13 @@ def get_product_type_name(stac_item):
return '_'.join(parts)


# allow to urljoin s3:// URLs
if 's3' not in uses_netloc:
uses_netloc.append('s3')
if 's3' not in uses_relative:
uses_relative.append('s3')


def get_path_from_href(href, file_href=None):
""" Extract the path from the given HREF. For S3 URLs this excludes
the bucket name. Leading and trailing slashes will be stripped, so
Expand All @@ -107,7 +116,7 @@ def get_path_from_href(href, file_href=None):
>>> get_path_from_href('s3://bucket/prefix/file.ext')
'prefix/file.ext'
>>> get_path_from_href('https://www.example.com/path/to#res.ext')
>>> get_path_from_href('https://www.example.com/path/to/res.ext')
'path/to/res.ext'
"""
if file_href:
Expand Down Expand Up @@ -515,7 +524,7 @@ def register_browse_for_asset(asset, file_href, product, storage, browse_type):
browse.coordinate_reference_system = sr.wkt

x_a = transform[0]
x_b = transform[0] + transform[1] * browse.width
x_b = transform[0] + transform[2] * browse.width
y_a = transform[3]
y_b = transform[3] + transform[5] * browse.height

Expand Down

0 comments on commit f732eb4

Please sign in to comment.