Skip to content

Commit

Permalink
Merge pull request #414 from geoadmin/develop
Browse files Browse the repository at this point in the history
New Release v1.24.0 - #minor
  • Loading branch information
rebert authored May 6, 2024
2 parents e84f938 + dc7c21d commit 0b53471
Show file tree
Hide file tree
Showing 2 changed files with 125 additions and 0 deletions.
121 changes: 121 additions & 0 deletions app/stac_api/migrations/0030_alter_asset_media_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Generated by Django 4.0.10 on 2024-05-06 09:07

from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
('stac_api', '0029_alter_collectionlink_href_alter_itemlink_href_and_more'),
]

operations = [
migrations.AlterField(
model_name='asset',
name='media_type',
field=models.CharField(
choices=
[(
'application/vnd.apache.parquet',
'Apache Parquet column-oriented data file format (application/vnd.apache.parquet)'
),
(
'application/x.ascii-grid+zip',
'Zipped ESRI ASCII raster format (.asc) (application/x.ascii-grid+zip)'
),
('application/x.ascii-xyz+zip', 'Zipped XYZ (.xyz) (application/x.ascii-xyz+zip)'),
('application/x.e00+zip', 'Zipped e00 (application/x.e00+zip)'),
('application/x.geotiff+zip', 'Zipped GeoTIFF (application/x.geotiff+zip)'),
('image/tiff; application=geotiff', 'GeoTIFF (image/tiff; application=geotiff)'),
('application/x.tiff+zip', 'Zipped TIFF (application/x.tiff+zip)'),
('application/x.png+zip', 'Zipped PNG (application/x.png+zip)'),
('application/x.jpeg+zip', 'Zipped JPEG (application/x.jpeg+zip)'),
(
'application/vnd.google-earth.kml+xml',
'KML (application/vnd.google-earth.kml+xml)'
),
(
'application/vnd.google-earth.kmz',
'Zipped KML (application/vnd.google-earth.kmz)'
), ('application/x.dxf+zip', 'Zipped DXF (application/x.dxf+zip)'),
('application/gml+xml', 'GML (application/gml+xml)'),
('application/x.gml+zip', 'Zipped GML (application/x.gml+zip)'),
('application/vnd.las', 'LIDAR (application/vnd.las)'),
('application/vnd.laszip', 'Zipped LIDAR (application/vnd.laszip)'),
('application/x.shapefile+zip',
'Zipped Shapefile (application/x.shapefile+zip)'), (
'application/x.filegdb+zip',
'Zipped File Geodatabase (application/x.filegdb+zip)'
),
(
'application/x.filegdbp+zip',
'Zipped File Geodatabase (ArcGIS Pro) (application/x.filegdbp+zip)'
),
(
'application/x.ms-access+zip',
'Zipped Personal Geodatabase (application/x.ms-access+zip)'
), ('application/x.ms-excel+zip', 'Zipped Excel (application/x.ms-excel+zip)'),
('application/x.tab+zip', 'Zipped Mapinfo-TAB (application/x.tab+zip)'),
(
'application/x.tab-raster+zip',
'Zipped Mapinfo-Raster-TAB (application/x.tab-raster+zip)'
), ('application/x.csv+zip',
'Zipped CSV (application/x.csv+zip)'), ('text/csv', 'CSV (text/csv)'),
('application/geopackage+sqlite3',
'Geopackage (application/geopackage+sqlite3)'), (
'application/x.geopackage+zip',
'Zipped Geopackage (application/x.geopackage+zip)'
), ('application/geo+json', 'GeoJSON (application/geo+json)'),
('application/x.geojson+zip', 'Zipped GeoJSON (application/x.geojson+zip)'),
(
'application/x.interlis; version=2.3',
'Interlis 2 (application/x.interlis; version=2.3)'
),
(
'application/x.interlis+zip; version=2.3',
'Zipped XTF (2.3) (application/x.interlis+zip; version=2.3)'
),
(
'application/x.interlis; version=2.4',
'Interlis 2 (application/x.interlis; version=2.4)'
),
(
'application/x.interlis+zip; version=2.4',
'Zipped XTF (2.4) (application/x.interlis+zip; version=2.4)'
),
(
'application/x.interlis; version=1',
'Interlis 1 (application/x.interlis; version=1)'
),
(
'application/x.interlis+zip; version=1',
'Zipped ITF (application/x.interlis+zip; version=1)'
),
(
'image/tiff; application=geotiff; profile=cloud-optimized',
'Cloud Optimized GeoTIFF (COG) (image/tiff; application=geotiff; profile=cloud-optimized)'
), ('application/pdf', 'PDF (application/pdf)'),
('application/x.pdf+zip', 'Zipped PDF (application/x.pdf+zip)'),
('application/json', 'JSON (application/json)'),
('application/x.json+zip', 'Zipped JSON (application/x.json+zip)'),
('application/x-netcdf', 'NetCDF (application/x-netcdf)'),
('application/x.netcdf+zip', 'Zipped NetCDF (application/x.netcdf+zip)'),
('application/xml', 'XML (application/xml)'),
('application/x.xml+zip', 'Zipped XML (application/x.xml+zip)'),
(
'application/vnd.mapbox-vector-tile',
'mbtiles (application/vnd.mapbox-vector-tile)'
), ('text/plain',
'Text (text/plain)'), ('text/x.plain+zip', 'Zipped text (text/x.plain+zip)'),
('application/x.dwg+zip', 'Zipped DWG (application/x.dwg+zip)'),
('application/zip',
'Generic Zip File (application/zip)'), ('image/tiff', 'TIFF (image/tiff)'),
('image/jpeg', 'JPEG (image/jpeg)'), ('image/png', 'PNG (image/png)'),
('application/vnd.sqlite3', 'sqlite (application/vnd.sqlite3)')],
help_text=
"This media type will be used as <em>Content-Type</em> header for the asset's object upon upload.</br></br><b>WARNING: when updating the Media Type, the asset's object Content-Type header is not automatically updated, it needs to be uploaded again.</b>",
max_length=200
),
),
]
4 changes: 4 additions & 0 deletions app/stac_api/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
NOTE: This list needs to be kept in sync with the openapi spec in ./spec/transaction/tags.yaml
'''
MEDIA_TYPES = [
MediaType(
'application/vnd.apache.parquet',
'Apache Parquet column-oriented data file format', ['.parquet']
),
MediaType('application/x.ascii-grid+zip', 'Zipped ESRI ASCII raster format (.asc)', ['.zip']),
MediaType('application/x.ascii-xyz+zip', 'Zipped XYZ (.xyz)', ['.zip']),
MediaType('application/x.e00+zip', 'Zipped e00', ['.zip']),
Expand Down

0 comments on commit 0b53471

Please sign in to comment.