@@ -12,7 +12,6 @@ const TURNSTILE_SITE_KEY = import.meta.env.VITE_TURNSTILE_SITE_KEY || '0x4AAAAAA
1212
1313function DownloadModal ( { item, collection, onClose } ) {
1414 const [ selectedAsset , setSelectedAsset ] = useState ( null ) ;
15- const [ selectedFormat , setSelectedFormat ] = useState ( 'geotiff' ) ;
1615 const [ isDownloading , setIsDownloading ] = useState ( false ) ;
1716 const [ error , setError ] = useState ( null ) ;
1817 const [ backendAvailable , setBackendAvailable ] = useState ( null ) ;
@@ -59,9 +58,6 @@ function DownloadModal({ item, collection, onClose }) {
5958 const collectionConfig = getCollection ( collection ) ;
6059 const availableBands = collectionConfig ? Object . keys ( collectionConfig . bands ) : [ ] ;
6160
62- // Check if PNG format is supported for this collection (disable for SAR)
63- const supportsPNG = collectionConfig ?. type !== 'sar' ;
64-
6561 // Check if downloads are disabled for this collection (SAR files too large)
6662 const downloadsDisabled = collectionConfig ?. type === 'sar' ;
6763
@@ -100,17 +96,14 @@ function DownloadModal({ item, collection, onClose }) {
10096 const bandConfig = collectionConfig . bands [ selectedAsset ] ;
10197 const assetKey = bandConfig . assets [ 0 ] ; // Use first asset for the band
10298
103- const filename = `${ collection } _${ item . id } _${ assetKey } .${ selectedFormat === 'geotiff' ? ' tif' : 'png' } ` ;
99+ const filename = `${ collection } _${ item . id } _${ assetKey } .tif` ;
104100
105101 // Get presigned URL from backend
106102 const response = await downloadTile ( {
107103 collection : collection ,
108104 itemId : item . id ,
109105 assetKey : assetKey ,
110106 bbox : null , // Full tile download
111- format : selectedFormat ,
112- rescale : bandConfig . rescale || null ,
113- colormap : bandConfig . colormap || null ,
114107 turnstileToken : turnstileToken ,
115108 } , filename , controller . signal ) ;
116109
@@ -242,33 +235,10 @@ function DownloadModal({ item, collection, onClose }) {
242235 </ div >
243236 </ div >
244237
245- { /* Format selection */ }
238+ { /* Format info */ }
246239 < div className = "download-section" >
247- < h3 > Select Format</ h3 >
248- { ! supportsPNG && (
249- < div className = "format-note" >
250- PNG conversion is disabled for SAR data (slow processing)
251- </ div >
252- ) }
253- < div className = "format-options" >
254- < button
255- className = { `format-option ${ selectedFormat === 'geotiff' ? 'selected' : '' } ` }
256- onClick = { ( ) => setSelectedFormat ( 'geotiff' ) }
257- disabled = { isDownloading }
258- >
259- < span className = "format-name" > GeoTIFF</ span >
260- < span className = "format-desc" > With georeferencing</ span >
261- </ button >
262- { supportsPNG && (
263- < button
264- className = { `format-option ${ selectedFormat === 'png' ? 'selected' : '' } ` }
265- onClick = { ( ) => setSelectedFormat ( 'png' ) }
266- disabled = { isDownloading }
267- >
268- < span className = "format-name" > PNG</ span >
269- < span className = "format-desc" > Smaller, no geo data</ span >
270- </ button >
271- ) }
240+ < div className = "format-note" >
241+ Downloads are provided as GeoTIFF format with full georeferencing.
272242 </ div >
273243 </ div >
274244
0 commit comments