Hi,
I tried to solve the problem during the weekend and made the fix that was suggested in the thread “Sentinel-2 - not downloading ver. 1.8.3”.
delete from public.datasource where id = 2;
update datasource set enabled = false where satellite_id = 3;
Now my ‘datasource’ table looks like this:
id | satellite_id | name | scope | username | passwrd | fetch_mode | max_retries | retry_interval_minutes | download_path | specific_params | max_connections | local_root | enabled
----±-------------±--------------------±------±---------------±-------------±-----------±------------±-----------------------±--------------------------------±--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------±----------------±-----------±--------
5 | 1 | Amazon Web Services | 2 | | | 1 | 72 | 60 | /mnt/archive/dwn_def/s2/default | {“parameters”:{“dsParameter”:[{“name”:"cloudcover…| 1 | | f
4 | 1 | Scientific Data Hub | 3 | xxxxxxx | xxxxxxx | 1 | 72 | 60 | /mnt/archive/dwn_def/s2/default | {“parameters”:{“dsParameter”:[{“name”:"cloudcover…| 1 | | t
1 | 2 | USGS | 1 | xxxxxxx | xxxxxxx | 1 | 72 | 60 | /mnt/archive/dwn_def/l8/default | {“parameters”:{“dsParameter”:[{“name”:"cloud_from…| 1 | | t
6 | 2 | Amazon Web Services | 2 | | | 1 | 72 | 60 | /mnt/archive/dwn_def/l8/default | {“parameters”:{“dsParameter”:[{“name”:"cloudcover…| 1 | | t
3 | 3 | Scientific Data Hub | 3 | xxxxxxx | xxxxxxx | 1 | 72 | 60 | /mnt/archive | {“parameters”:{“dsParameter”:[{“name”:"platformNa…| 1 | | f
(5 rows)
I read somewhere that sen2agri does not support MULTYPOLIGON geometry type for site definition, but in geography_columns view I find that geometry in ‘site’ table is declared as MultiPolygon.
f_table_catalog | f_table_schema | f_table_name | f_geography_column | coord_dimension | srid | type
-----------------±---------------±-------------------±-------------------±----------------±-----±-------------
sen2agri | public | site | geog | 2 | 4326 | MultiPolygon
sen2agri | public | downloader_history | footprint | | 0 | Geometry
sen2agri | public | product | geog | | 0 | Geometry
sen2agri | public | shape_tiles_l8 | geog | 2 | 4326 | MultiPolygon
sen2agri | public | shape_tiles_s2 | geog | | 0 | Geometry
(5 rows)
I also found in 03.site.sql file that ‘geog’ column in ‘site’ table is defined as multipolygon:
CREATE TABLE site
(
id smallserial,
name character varying NOT NULL,
short_name character varying,
geog geography(multipolygon) NOT NULL,
enabled boolean NOT NULL,
CONSTRAINT site_pkey PRIMARY KEY (id)
);
I’m sure geometry in my site shapefile is defined as POYGON geometry type, but when I upload the polygon shapefile, the geometry is inserted as multipoligon.
sen2agri\site>ogrinfo -al site_3.shp
INFO: Open of site_3.shp' using driver
ESRI Shapefile’ successful.
Layer name: site_3
Metadata:
DBF_DATE_LAST_UPDATE=2018-09-28
Geometry: Polygon
Feature Count: 1
Extent: (17.041099, 45.163104) - (18.573213, 45.785135)
…
After all, I have reduced the number of decimals in the site coordinates with SQL:
SELECT ST_AsText(ST_SnapToGrid(‘MULTIPOLYGON(((17.0410986388555 45.7851345027698,18.5732133702968 45.7225140096592,18.5732133702968 45.7225140096592,18.5481651730525 45.1631042712038,17.0619721365591 45.2298994638552,17.0410986388555 45.7851345027698)))’, 0.00001));
UPDATE site SET geog = st_geometryfromtext(‘MULTIPOLYGON(((17.0411 45.78513,18.57321 45.72251,18.54817 45.1631,17.06197 45.2299,17.0411 45.78513)))’, 4326) WHERE id = 5
downloader_history.txt (12.8 KB)
sen2agri_log.txt (155.6 KB)
… but the result is the same.
The log file and is attached.