Replies: 1 comment 1 reply
-
|
@nuayge can you share the version of titiler-pgstac you're using? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone, I have TiTiler-PGStac running with the
noaa-emergency-responsecollection from the tests folder.I'm trying to get some statistics for multiple geometries.
If I send two points, I receive back a FeatureCollection with two points, but they have the same values
res.json()
{'type': 'FeatureCollection',
'features': [{'type': 'Feature',
'geometry': {'type': 'Point',
'coordinates': [-85.47477772241675, 36.152795257931984]},
'properties': {'statistics': {'cog_b1': {'min': 81.0,
'max': 81.0,
'mean': 81.0,
'count': 0.009999999776482582,
'sum': 0.8100000023841858,
'std': 0.0,
'median': 81.0,
'majority': 81.0,
'minority': 81.0,
'unique': 1.0,
'histogram': [[0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
[80.5, 80.6, 80.7, 80.8, 80.9, 81.0, 81.1, 81.2, 81.3, 81.4, 81.5]],
'valid_percent': 100.0,
'masked_pixels': 0.0,
'valid_pixels': 1.0,
'percentile_2': 81.0,
'percentile_98': 81.0},
'cog_b2': {'min': 72.0,
'max': 72.0,
'mean': 72.0,
'count': 0.009999999776482582,
'sum': 0.7199999690055847,
'std': 0.0,
'median': 72.0,
'majority': 72.0,
'minority': 72.0,
'unique': 1.0,
'histogram': [[0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
[71.5, 71.6, 71.7, 71.8, 71.9, 72.0, 72.1, 72.2, 72.3, 72.4, 72.5]],
'valid_percent': 100.0,
'masked_pixels': 0.0,
'valid_pixels': 1.0,
'percentile_2': 72.0,
'percentile_98': 72.0},
'cog_b3': {'min': 73.0,
'max': 73.0,
'mean': 73.0,
'count': 0.009999999776482582,
'sum': 0.7299999594688416,
'std': 0.0,
'median': 73.0,
'majority': 73.0,
'minority': 73.0,
'unique': 1.0,
'histogram': [[0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
[72.5, 72.6, 72.7, 72.8, 72.9, 73.0, 73.1, 73.2, 73.3, 73.4, 73.5]],
'valid_percent': 100.0,
'masked_pixels': 0.0,
'valid_pixels': 1.0,
'percentile_2': 73.0,
'percentile_98': 73.0}}}},
{'type': 'Feature',
'geometry': {'type': 'Point',
'coordinates': [-85.46603751623104, 36.136352659372946]},
'properties': {'statistics': {'cog_b1': {'min': 81.0,
'max': 81.0,
'mean': 81.0,
'count': 0.009999999776482582,
'sum': 0.8100000023841858,
'std': 0.0,
'median': 81.0,
'majority': 81.0,
'minority': 81.0,
'unique': 1.0,
'histogram': [[0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
[80.5, 80.6, 80.7, 80.8, 80.9, 81.0, 81.1, 81.2, 81.3, 81.4, 81.5]],
'valid_percent': 100.0,
'masked_pixels': 0.0,
'valid_pixels': 1.0,
'percentile_2': 81.0,
'percentile_98': 81.0},
'cog_b2': {'min': 72.0,
'max': 72.0,
'mean': 72.0,
'count': 0.009999999776482582,
'sum': 0.7199999690055847,
'std': 0.0,
'median': 72.0,
'majority': 72.0,
'minority': 72.0,
'unique': 1.0,
'histogram': [[0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
[71.5, 71.6, 71.7, 71.8, 71.9, 72.0, 72.1, 72.2, 72.3, 72.4, 72.5]],
'valid_percent': 100.0,
'masked_pixels': 0.0,
'valid_pixels': 1.0,
'percentile_2': 72.0,
'percentile_98': 72.0},
'cog_b3': {'min': 73.0,
'max': 73.0,
'mean': 73.0,
'count': 0.009999999776482582,
'sum': 0.7299999594688416,
'std': 0.0,
'median': 73.0,
'majority': 73.0,
'minority': 73.0,
'unique': 1.0,
'histogram': [[0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
[72.5, 72.6, 72.7, 72.8, 72.9, 73.0, 73.1, 73.2, 73.3, 73.4, 73.5]],
'valid_percent': 100.0,
'masked_pixels': 0.0,
'valid_pixels': 1.0,
'percentile_2': 73.0,
'percentile_98': 73.0}}}}]}
If I send two Polygons,
the server crashes with
I understand the two points are "merged" and then re-splitted into the original features due to them having the exact same values.
This issue: #122 hints at something similar, but I maybe did not understand how I should use the statistics endpoint: I would expect each geometry to get its own statistics, am I getting this wrong ?
Beta Was this translation helpful? Give feedback.
All reactions