SpatioTemporal / STAREPandas

STAREpandas adds SpatioTemporal Adaptive Resolution Encoding (STARE) support to pandas DataFrames. https://starepandas.readthedocs.io/en/latest/
MIT License
5 stars 1 forks source link

Inside out trixels #161

Closed mbauer288 closed 7 months ago

mbauer288 commented 11 months ago

I saved of a single ETC track geopandas dataframe mcms_merra2_npac_2017_usi_tagrp_niklas.pkl for you here is some relevant code to it's creation.

# WGS-84 Earth equatorial radius at sea level (meters)
#   STARE uses ccrs.Globe(datum='WGS84', ellipse='WGS84') https://epsg.io/4326
#   Clarke 1866 ellipsoid https://epsg.io/7008-ellipsoid
globe = ccrs.Globe(datum='WGS84', ellipse='WGS84')
lon_0_global = 180
lat_0_global = 90.0

##
# Geodetic:
#   A 3D/spherical CRS based on latitude and longitude where geographical distance and coordinates are measured in degrees.
geod_crs = ccrs.Geodetic(globe=globe)

# Lambert Azimuthal Equal-Area
#   A 2D CRS centered on (map_lat0, map_lon0), which is then the zero point of the flat topology w/ Euclidean distance (m).
polar_crs = ccrs.LambertAzimuthalEqualArea(central_longitude=lon_0_global, central_latitude=lat_0_global, globe=globe)

...

##
# Convert to map projection (Cartesian Coordinates)
#   Lambert Azimuthal Equal-Area
#       A 2D CRS centered on (map_lat0, map_lon0), which is then the zero point of the flat topology w/ Euclidean distance (m).
transformed = polar_crs.transform_points(geod_crs, np.array(raw_lons_180), np.array(raw_lats))
vert_x = transformed[..., 0].tolist()
vert_y = transformed[..., 1].tolist()
verts_proj = [(float(vert_x[_]), float(vert_y[_])) for _ in range(len(vert_y))]
poly_proj = Polygon(verts_proj)

##
# Test if poly_proj oriented CCW
is_ccw = poly_proj.exterior.is_ccw
...
vert_polys.append(poly_proj)
...
usi_geo_df = geopandas.GeoDataFrame(df_dict, crs=geod_crs, geometry=vert_polys)
...
usi_storage.append(usi_geo_df)

usi_df_geo = pandas.concat(usi_storage)

After this, I try to make SIDs etc.

    usi                   uci                  timestamp            lon     lat    cslp      ctype  cinten  ttype    tinten   depth   sarea  sa_fill                                            vert_poly_geo                                      verts                                                geometry
0   20161127060534214500  20161127060534214500 2016-11-27 06:00:00  145.00  36.58  1009.155  MCCpe       2  CE-Type       3     NaN   532.0  [135570, 135571, 135572, 135573, 136145, 13614...  POLYGON ((131.25 27.30271568235687, 131.166585...  POLYGON ((-4991373.327776374 -4377316.92646971...    POLYGON ((-4991373.328 -4377316.926, -4968952....
1   20161127060534214500  20161127090525014625 2016-11-27 09:00:00  146.22  37.52  1007.545   MCCp       2  CE-Type       3   4.955   632.0  [137300, 137301, 137302, 137876, 137877, 13787...  POLYGON ((132.5 28.95554468139951, 132.4971589...  POLYGON ((-4778823.880540232 -4378985.29687793...    POLYGON ((-4778823.881 -4378985.297, -4760473....
2   20161127060534214500  20161127120515014750 2016-11-27 12:00:00  147.69  38.48  1006.002   MCCp       2  CE-Type       3   6.498   754.0  [137879, 137880, 138454, 138455, 138456, 13845...  POLYGON ((134.375 29.40231816922109, 134.30738...  POLYGON ((-4602453.9456636 -4503123.563426008,...    POLYGON ((-4602453.946 -4503123.563, -4592391....
3   20161127060534214500  20161127150505014937 2016-11-27 15:00:00  149.41  39.48  1001.928   MCCp       3  CE-Type       3  10.572   888.0  [137305, 137306, 137881, 137882, 137883, 13788...  POLYGON ((135.625 29.150321060529777, 135.5606...  POLYGON ((-4519983.324432571 -4619685.60108559...    POLYGON ((-4519983.324 -4619685.601, -4491742....
4   20161127060534214500  20161127180500015062 2016-11-27 18:00:00  150.78  39.98   997.696   MCCp       3  CE-Type       3  14.804   999.0  [136155, 136162, 136163, 136164, 136165, 13673...  POLYGON ((136.875 28.23759472424501, 136.61814...  POLYGON ((-4477636.146347632 -4780723.45777086...    POLYGON ((-4477636.146 -4780723.458, -4448733....
5   20161127060534214500  20161127210490015250 2016-11-27 21:00:00  152.53  40.98   992.087   MCCp       3  CE-Type       3  20.413  1021.0  [137315, 137316, 137317, 137318, 137319, 13732...  POLYGON ((143.125 28.95554890446175, 143.03602...  POLYGON ((-3889492.392842159 -5185027.83107675...    POLYGON ((-3889492.393 -5185027.831, -3862462....
6   20161127060534214500  20161128000480015375 2016-11-28 00:00:00  153.88  42.00   986.276    SCC       3  CE-Type       3  28.724  1221.0  [135588, 135589, 135590, 135591, 136159, 13616...  POLYGON ((139.375 27.95960768675472, 139.34636...  POLYGON ((-4282049.948926639 -4991543.91863850...    POLYGON ((-4282049.949 -4991543.919, -4255743....
7   20161127060534214500  20161128030470015562 2016-11-28 03:00:00  155.59  42.85   980.554    SCC       3  CE-Type       3  31.946  1209.0  [137319, 137320, 137321, 137322, 137323, 13732...  POLYGON ((143.75000000000003 29.45626240229294...  POLYGON ((-3804388.0572101986 -5188530.6281868...    POLYGON ((-3804388.057 -5188530.628, -3779104....
8   20161127060534214500  20161128060465015750 2016-11-28 06:00:00  157.38  43.58   976.577    SCC       3  CE-Type       3  33.423  1098.0  [139629, 139630, 139631, 139632, 139633, 13963...  POLYGON ((149.375 30.964103790972295, 149.2661...  POLYGON ((-3203663.401579738 -5411708.36437956...    POLYGON ((-3203663.402 -5411708.364, -3174834....
9   20161127060534214500  20161128090450015875 2016-11-28 09:00:00  158.84  44.82   972.331    SCC       3  CE-Type       3  40.169  1265.0  [139632, 139633, 139634, 139635, 139636, 13963...  POLYGON ((151.875 30.894662029573905, 151.5655...  POLYGON ((-2967717.2751937043 -5552208.5052815...    POLYGON ((-2967717.275 -5552208.505, -2937616....
10  20161127060534214500  20161128120440016000 2016-11-28 12:00:00  160.00  45.90   965.404    SCC       3  CE-Type       3  44.596  1154.0  [141371, 141372, 141373, 141946, 141947, 14194...  POLYGON ((156.25 32.82566446698663, 156.073124...  POLYGON ((-2460135.1922726394 -5591082.5299711...    POLYGON ((-2460135.192 -5591082.530, -2431120....
11  20161127060534214500  20161128150435016000 2016-11-28 15:00:00  160.03  46.48   959.870    SCC       3  CE-Type       3  47.630  1098.0  [143105, 143106, 143107, 143680, 143681, 14368...  POLYGON ((160 34.31744138496129, 159.965797525...  POLYGON ((-2039315.8447717451 -5602974.2346463...    POLYGON ((-2039315.845 -5602974.235, -2012317....
12  20161127060534214500  20161128180435016000 2016-11-28 18:00:00  160.16  46.52   957.199    SCC       3  CE-Type       3  50.301  1143.0  [143109, 143110, 143685, 143686, 143687, 14368...  POLYGON ((163.125 34.23531565646839, 162.90001...  POLYGON ((-1733178.425653418 -5713523.56664257...    POLYGON ((-1733178.426 -5713523.567, -1700896....
13  20161127060534214500  20161128210435016187 2016-11-28 21:00:00  161.69  46.48   958.880    SCC       3  CE-Type       3  46.120  1043.0  [145999, 146000, 146001, 146575, 146576, 14657...  POLYGON ((169.375 36.63678803963476, 169.06519...  POLYGON ((-1057194.1357849506 -5635466.4079087...    POLYGON ((-1057194.136 -5635466.408, -1024622....
14  20161127060534214500  20161129000435016375 2016-11-29 00:00:00  163.72  46.45   959.267    SCC       3  CE-Type       3  45.733  1121.0  [147156, 147157, 147158, 147731, 147732, 14773...  POLYGON ((-180 42.61616539159444, -179.8613857...  POLYGON ((0 -5132991.585569387, 12370.71278706...    POLYGON ((0.000 -5132991.586, 12370.713 -51133...
15  20161127060534214500  20161129030435016625 2016-11-29 03:00:00  166.16  46.52   960.063    SCC       3  CE-Type       3  44.937  1187.0  [147735, 147736, 147737, 147738, 148306, 14830...  POLYGON ((-180 40.609651915317045, -179.743011...  POLYGON ((0 -5336295.581994906, 23846.08316602...    POLYGON ((0.000 -5336295.582, 23846.083 -53164...
16  20161127060534214500  20161129060430016812 2016-11-29 06:00:00  168.22  46.98   962.792    SCC       3  CE-Type       3  42.208  1187.0  [148891, 148892, 148893, 148894, 149451, 14945...  POLYGON ((-180 39.966462710536625, -179.969952...  POLYGON ((0 -5401108.598740947, 2831.624620038...    POLYGON ((0.000 -5401108.599, 2831.625 -539940...
17  20161127060534214500  20161129090425017000 2016-11-29 09:00:00  170.12  47.38   965.301    SCC       3  CE-Type       3  37.199  1087.0  [150607, 150608, 150609, 150610, 150611, 15061...  POLYGON ((-180 41.447341288063846, -179.708654...  POLYGON ((0 -5251622.055216247, 26690.14343760...    POLYGON ((0.000 -5251622.055, 26690.143 -52488...
18  20161127060534214500  20161129120425017187 2016-11-29 12:00:00  172.00  47.62   967.290    SCC       3  CE-Type       3  35.210  1110.0  [151186, 151187, 151188, 151189, 151190, 15119...  POLYGON ((-180 41.71480087095767, -179.6878498...  POLYGON ((0 -5224525.707752153, 28431.18659175...    POLYGON ((0.000 -5224525.708, 28431.187 -52185...
19  20161127060534214500  20161129150415017437 2016-11-29 15:00:00  174.41  48.40   968.752    SCC       3  CE-Type       3  31.248  1054.0  [152337, 152338, 152339, 152340, 152341, 15234...  POLYGON ((-180 42.58242045765191, -179.6878655...  POLYGON ((0 -5136424.388525855, 27948.94779428...    POLYGON ((0.000 -5136424.389, 27948.948 -51302...
20  20161127060534214500  20161129180410017687 2016-11-29 18:00:00  176.84  49.15   969.440    SCC       3  CE-Type       3  28.060   999.0  [153488, 153489, 153490, 153491, 153492, 15349...  POLYGON ((-180 43.45047951424621, -179.8562194...  POLYGON ((0 -5047972.065569283, 12661.11112643...    POLYGON ((0.000 -5047972.066, 12661.111 -50453...
21  20161127060534214500  20161129210400017875 2016-11-29 21:00:00  178.81  49.95   970.217    SCC       3  CE-Type       3  27.283   999.0  [154065, 154066, 154067, 154068, 154069, 15407...  POLYGON ((-180 43.76485796348372, -179.6877648...  POLYGON ((0 -5015863.314521517, 27310.48703343...    POLYGON ((0.000 -5015863.315, 27310.487 -50114...
22  20161127060534214500  20161130000395018062 2016-11-30 00:00:00 -179.25  50.65   969.683    SCC       3  CE-Type       3  27.817  1032.0  [154070, 154071, 154072, 154073, 154074, 15407...  POLYGON ((-180 43.813917896579284, -179.687718...  POLYGON ((0 -5010849.071529755, 27291.30648136...    POLYGON ((0.000 -5010849.072, 27291.306 -50072...
23  20161127060534214500  20161130030390018312 2016-11-30 03:00:00 -176.97  51.12   969.173    SCC       3  CE-Type       3  25.827   965.0  [154651, 154652, 154653, 155224, 155225, 15522...  POLYGON ((-180 44.38867086684088, -179.6877149...  POLYGON ((0 -4952034.588753399, 26971.54966118...    POLYGON ((0.000 -4952034.589, 26971.550 -49484...
24  20161127060534214500  20161130060380018500 2016-11-30 06:00:00 -175.09  51.85   969.713    SCC       3  CE-Type       3  22.787   865.0  [156381, 156382, 156383, 156384, 156385, 15638...  POLYGON ((-180 45.366038966913955, -179.687461...  POLYGON ((0 -4851723.141228927, 26468.04072942...    POLYGON ((0.000 -4851723.141, 26468.041 -48521...
25  20161127060534214500  20161130090380018625 2016-11-30 09:00:00 -173.75  52.10   970.010   MCCp       3  CE-Type       3  24.990  1143.0  [156384, 156385, 156386, 156387, 156388, 15638...  POLYGON ((-180 45.868499777312664, -179.687147...  POLYGON ((0 -4800009.646680949, 26238.44213170...    POLYGON ((0.000 -4800009.647, 26238.442 -48052...
26  20161127060534214500  20161130120375018812 2016-11-30 12:00:00 -172.00  52.50   970.902   MCCp       3  CE-Type       3  24.098  1110.0  [156965, 156966, 156967, 156968, 156969, 15697...  POLYGON ((180 46.96980085443266, 179.950004549...  POLYGON ((0 -4686327.486130397, 25653.25476479...    POLYGON ((0.000 -4686327.486, 25653.255 -46947...
27  20161127060534214500  20161130150370019000 2016-11-30 15:00:00 -169.97  52.88   972.699   MCCp       3  CE-Type       3  22.301   954.0  [158115, 158116, 158117, 158118, 158119, 15812...  POLYGON ((180 47.99428199209717, 179.994605633...  POLYGON ((0 -4580168.461180703, 25143.71357949...    POLYGON ((0.000 -4580168.461, 25143.714 -45949...
28  20161127060534214500  20161130180370019250 2016-11-30 18:00:00 -167.56  53.15   974.889  MCCpe       3  CE-Type       3     NaN  1010.0  [157542, 157543, 157544, 157545, 158115, 15811...  POLYGON ((180 48.50206730733541, 179.827312611...  POLYGON ((0 -4527407.990992295, 63.32715293035...    POLYGON ((0.000 -4527407.991, 63.327 -4527515....
29  20161127060534214500  20161130210380019125 2016-11-30 21:00:00 -168.54  52.13   982.263  MCCse       3  CE-Type       3     NaN     NaN                                           [163890]                  POINT (-168.53999999999996 52.13)       POINT (824101.646393744 -4065113.4753176556)                      POINT (824101.646 -4065113.475)
30  20161127060534214500  20161201000375019375 2016-12-01 00:00:00 -166.09  52.66   983.024  MCCse       3  CE-Type       3     NaN     NaN                                           [164470]                  POINT (-166.09000000000003 52.66)       POINT (983700.2742880785 -3971975.440805582)                      POINT (983700.274 -3971975.441)
31  20161127060534214500  20161201030375019500 2016-12-01 03:00:00 -164.77  52.71   985.517  MCCse       3  CE-Type       3     NaN     NaN                                           [164472]                  POINT (-164.76999999999998 52.71)     POINT (1073553.9901276734 -3943173.8607643554)                     POINT (1073553.990 -3943173.861)
32  20161127060534214500  20161201060375019562 2016-12-01 06:00:00 -164.34  52.58   987.316  MCCse       3  CE-Type       3     NaN     NaN                                           [164473]                  POINT (-164.34000000000003 52.58)     POINT (1106816.0710902067 -3948202.3653108026)                     POINT (1106816.071 -3948202.365)
33  20161127060534214500  20161201090380019500 2016-12-01 09:00:00 -164.91  51.98   987.401  MCCse       3  CE-Type       3     NaN     NaN                                           [163896]                  POINT (-164.90999999999997 51.98)      POINT (1083932.3373227278 -4020021.359290102)                     POINT (1083932.337 -4020021.359)
34  20161127060534214500  20161201120380019562 2016-12-01 12:00:00 -164.17  51.80   986.973  MCCse       3  CE-Type       3     NaN     NaN                                           [163897]                   POINT (-164.16999999999996 51.8)      POINT (1140924.9778596621 -4023900.345250855)                     POINT (1140924.978 -4023900.345)
35  20161127060534214500  20161201150385020000 2016-12-01 15:00:00 -159.78  51.67   984.348  MCCse       3  CE-Type       3     NaN     NaN                                           [163328]                  POINT (-159.77999999999997 51.67)      POINT (1450310.4068563096 -3937586.283483575)                     POINT (1450310.407 -3937586.283)  
polys_pds = usi_df_geo['vert_poly_geo']

The first curious thing is the column vert_poly_geo are not shown to be in projection units when I print the mcms_tagrp_gdf.head(), so I am curious why they are projected like the geometry column.

                                             geometry
0   POLYGON ((-4991373.328 -4377316.926, -4968952....
1   POLYGON ((-4778823.881 -4378985.297, -4760473....
2   POLYGON ((-4602453.946 -4503123.563, -4592391....
3   POLYGON ((-4519983.324 -4619685.601, -4491742....
4   POLYGON ((-4477636.146 -4780723.458, -4448733....
5   POLYGON ((-3889492.393 -5185027.831, -3862462....
6   POLYGON ((-4282049.949 -4991543.919, -4255743....
7   POLYGON ((-3804388.057 -5188530.628, -3779104....
8   POLYGON ((-3203663.402 -5411708.364, -3174834....
9   POLYGON ((-2967717.275 -5552208.505, -2937616....
10  POLYGON ((-2460135.192 -5591082.530, -2431120....
11  POLYGON ((-2039315.845 -5602974.235, -2012317....
12  POLYGON ((-1733178.426 -5713523.567, -1700896....
13  POLYGON ((-1057194.136 -5635466.408, -1024622....
14  POLYGON ((0.000 -5132991.586, 12370.713 -51133...
15  POLYGON ((0.000 -5336295.582, 23846.083 -53164...
16  POLYGON ((0.000 -5401108.599, 2831.625 -539940...
17  POLYGON ((0.000 -5251622.055, 26690.143 -52488...
18  POLYGON ((0.000 -5224525.708, 28431.187 -52185...
19  POLYGON ((0.000 -5136424.389, 27948.948 -51302...
20  POLYGON ((0.000 -5047972.066, 12661.111 -50453...
21  POLYGON ((0.000 -5015863.315, 27310.487 -50114...
22  POLYGON ((0.000 -5010849.072, 27291.306 -50072...
23  POLYGON ((0.000 -4952034.589, 26971.550 -49484...
24  POLYGON ((0.000 -4851723.141, 26468.041 -48521...
25  POLYGON ((0.000 -4800009.647, 26238.442 -48052...
26  POLYGON ((0.000 -4686327.486, 25653.255 -46947...
27  POLYGON ((0.000 -4580168.461, 25143.714 -45949...
28  POLYGON ((0.000 -4527407.991, 63.327 -4527515....
29                    POINT (824101.646 -4065113.475)
30                    POINT (983700.274 -3971975.441)
31                   POINT (1073553.990 -3943173.861)
32                   POINT (1106816.071 -3948202.365)
33                   POINT (1083932.337 -4020021.359)
34                   POINT (1140924.978 -4023900.345)
35                   POINT (1450310.407 -3937586.283)

Here I try to find the SIDs opts.mcms_q_level = 10 opts.n_parts = 60 opts.n_cores = 6

sids = starepandas.sids_from_geoseries(polys_pds, level=opts.mcms_q_level, convex=False, force_ccw=False, n_partitions=opts.n_parts, num_workers=opts.n_cores)

and here is the error.


Traceback (most recent call last):
  File "/Users/mbauer/myDev/imergview/imerg_imaging.py", line 208, in <module>
    main(opts)
  File "/Users/mbauer/myDev/imergview/imerg_imaging.py", line 108, in main
    msg = process_mcms_data(opts, dryrun=DRY_RUN)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mbauer/myDev/imergview/src/imergview/util/process_mcms_data.py", line 110, in process_mcms_data
    msg = refine_mcms_stare(opts)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mbauer/myDev/imergview/src/imergview/util/refine_mcms_stare.py", line 191, in refine_mcms_stare
    sids = starepandas.sids_from_geoseries(polys_pds, level=opts.mcms_q_level, convex=False, force_ccw=False, n_partitions=opts.n_parts, num_workers=opts.n_cores)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mbauer/SpatioTemporal/STAREPandas/starepandas/tools/spatial_conversions.py", line 108, in sids_from_geoseries
    sids = res.compute(scheduler='processes', num_workers=num_workers)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mbauer/miniconda3/envs/stare/lib/python3.11/site-packages/dask/base.py", line 342, in compute
    (result,) = compute(self, traverse=False, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mbauer/miniconda3/envs/stare/lib/python3.11/site-packages/dask/base.py", line 628, in compute
    results = schedule(dsk, keys, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mbauer/SpatioTemporal/STAREPandas/starepandas/tools/spatial_conversions.py", line 100, in sids_from_geoseries
    sids = series.apply(sids_from_shapely, level=level, convex=convex, force_ccw=force_ccw)
  ^^^^^^^^^^^^^^^^^
  File "lib.pyx", line 2920, in pandas._libs.lib.map_infer
  File "/Users/mbauer/SpatioTemporal/STAREPandas/starepandas/tools/spatial_conversions.py", line 236, in sids_from_shapely
    if geom.geom_type == 'Point':
      ^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'geom_type'

If I set convex=True I get the same error.

NiklasPhabian commented 11 months ago

ok. There seem to be multiple issues going on. You project the points to LambertAziumthalEqual area. Therefore, all the subsequent geometries are in this projection. When you bootstrap the gdf, you'll need to tell it and set the CRS to polar_crs, rather than geod_crs.

geopandas.GeoDataFrame(df_dict, crs=polar_crs, geometry=vert_polys)

Next, you cannot hand those projected coordinates to STARE. STARE knows nothing about projections and assumes all x/y coordinates are wgs84 lat/lons. Since STARE doesn't know about projections, neither does pystare. Unfortunately, STAREPandas also does not give a damn about projections as well, even though it could/should.

So before you could do a starepandas.sids_from_geoseries, you have to reproject them to WGS84 coordinates. IMO, the easiest way would be to do

usi_geo_df = usi_geo_df.set_geometry('vert_poly_geo').to_crs(4326)['geometry']
usi_geo_df.make_sids()

Or:

usi_geo_df = usi_geo_df.set_geometry('vert_poly_geo').to_crs(4326)
sids = starepandas.sids_from_geoseries(polys_pds, level=opts.mcms_q_level, convex=False, force_ccw=False, n_partitions=opts.n_parts, num_workers=opts.n_cores)

Word of caution: While multiple geometry columns are supported in geopandas, the CRS is a setting of the dataframe, not the individual column. I.e. be very very careful of having multiple geom columns with differing CRS

NiklasPhabian commented 11 months ago

Uff. Ok. Your final error is actually even more curious. Try running usi_geo_df.info(), You will see that the columns that should hold geometries are actually type object. I wonder if this is a result of some I/O action where geopandas looses track.

Note the difference in the datatypes:

usi_geo_df['vert_poly_geo']
usi_geo_df.set_geometry('vert_poly_geo')['vert_poly_geo']

Since you (rightfully) did the first option, starepandas is receiving a series of strings rather than a series of geoms and barfs.

NiklasPhabian commented 11 months ago

quick question: Is this issue also about inside-out polygons or just about this mixed geom problem?

NiklasPhabian commented 11 months ago

Answering my own question: It would seem like all polygons are CCW; surprisingly both in LEAE projection and in plate carree space. I.e. all SIDs should be generated correctly. The Trixels should be derivable by doing the split_antimeridian trick.

NiklasPhabian commented 11 months ago

take a look here: https://github.com/SpatioTemporal/STAREPandas/blob/antimeridian/examples/antimeridian.ipynb