-
Notifications
You must be signed in to change notification settings - Fork 13
Store location and field of view metadata associated with each file in Clowder #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
location: position (gantry_system_variable_metadata) "Field of view at 2m in X- Y- direction [m]": "[1.857 1.246]" |
This is relative to the SE corner of the gantry. See terraref/documentation#9 |
note that the [0,0] coordinate of the gantry is at south east corner. |
South east. Wagner&Müller (the company that programmed the gantry) has strange ideas on definitions & procedures. |
@caicai89- Field of view would describe the size of the rectangle you would see at 2m distance with the sensor. Note that for line sensors (3d, Hyperspec) this is a y dimension only. |
Followup from meeting on 05/23 with @dlebauer @caicai89- @yanliu-chn @robkooper. Summary workflow:
Right now, the message for 1 does not exist. Suggest starting just by converting sample coordinates to lat/lon. Then we can implement that in extractor on actual metadata once other parts are done. After converting coordinates is done, we can enable PostGIS database on TERRA Clowder development instance (http://141.142.209.122/clowder/) and create some sample data there to test with. |
@robkooper Could you share the geostream example with me and @yanliu-chn |
Here is the example file from above (renamed to .txt to allow upload here) |
@caicai89- I think we will need to add a *.dataset.metadata.added message, there does not currently seem to be one. *.dataset.file.added is valid, for example. Will talk with @robkooper but this should be a simple addition to Clowder along the lines of:
...adjusted for metadata and triggered in the right places. There are separate pull requests to add a dataset.file.added message and to add support in PyClowder for dataset extractors: |
|
@caicai89- the queue name should be defined by your extractor in config.py. For example, take a look at my pending pull request for PyClowder example dataset extractor:
...to automatically connect and listen for messages on Clowder exchange, datasetFileCount queue. The parameters for on_message() and process_file() will have info about dataset. Can show you sometime if you want. |
@max-zilla thank you! |
Thanks! @robkooper |
@caicai89- this appears to be a discussion ... is there an actual task associated with this issue? |
Task is defined by title
|
terraref/reference-data#32 (comment) is a discussion |
@caicai89- have you "Stored location and field of view metadata associated with each file in Clowder"? |
Not yet, last week Max helped me set up the testing environment, and I found some errors during testing. In addition, for the geostreams API part, I still have some questions. |
@caicai89- does the sensor ID creation make sense? I think in addition to seeing if the metadata is there, we should check dataset name:
|
@max-zilla Will work on that later. |
@caicai89- have you made the updates requested above? If not, can you put them in a new issue? |
@dlebauer @robkooper I finished up the remaining tasks on this extractor and deployed to clowder-dev instance. the process is ready:
I verified via the API that the stream + datapoints exist, but I wasn't seeing the datapoints appear in the Clowder UI. This might be a TERRA-dev Clowder issue (they appeared locally in my testing) but the data are there. We'll need to deploy PostGIS to the production server before we can deploy this there. NOTE: This adds the datapoint as a "point" still (geojson support in Clowder is being reviewed) but in the properties of the dp we store the FOV polygon so we can use it later:
|
Are two points enough to define a polygon? I don't think we can assume that the edges are parallel to lat/lon ( @tingli3 ?) |
Deployed to clowder-dev. @robkooper - Ready to move to production |
can this issue be closed? |
I plan to install geostreams stuff today/tomorrow and deploy this on production, then I'll close. |
I installed geostreams database on production and deployed the geospatial metadata extractor. Closing this issue. |
@max-zilla at this point, where can I find the bounding box for the image files? For example, where are the field-of-view bounding boxes for the geotiffs here: https://terraref.ncsa.illinois.edu/clowder/datasets/58dd375a4f0c430e2bff1b21 |
@dlebauer those are stored in the geostreams plots. The sensorposition extractor has this JSON data for each dataset/file it processes:
...in this case, what you're looking for are file_ids. I just created this pull request: that will add a datapoints search filter so you can search like this:
etc. The datapoint FOV will have it. But Zongyang has been overhauling how the stereo RBG geotiffs are generated, so the FOVs in the geostreams will need to also be updated to match. |
@max-zilla has this been implemented? Does geostreams now store the FOV as a PostGIS geometry for each file? |
yes, postGIS stores FOV now in sensorposition. closing. |
@max-zilla can you give examples? For example, if I want the bounding box for Wouldn't I use the query https://terraref.ncsa.illinois.edu/clowder/api/geostreams/datapoints?filter={%22file_ids%22:%22598fa7f74f0c7dbcc8c0da69%22} ? This returns the error in |
This is in the new extractor updates I have yet to deploy - no results to look at yet. should have some in next day or two. |
Description
Metadata files provide geospatial information that we should add to meta-data and also to the Clowder PostGIS database
Position of the gantry + camera
assume that the center of the sensor is located at
position + location in camera box
e.g. :
["location in camera box X [m]", "location in camera box Y [m]" + "location in camera box Z [m]"] + "Position x [m]", "Position y [m]" + "Position z [m]"]
Field of view
Assume the value provided for field of view is the height and width of the sides of the bounding box
Transforming to geospatial coordinates
Info from Solmaz on converting XYZ in meters to coordinates (for hyperspectral, but has SE corner origin points) terraref/documentation#9
Check what level of precision is required given resolution of the image. (how many significant digits in WGS85, web mercator).
Example
Here is an example of the current meta-data format (interpretation is discussed in terraref/reference-data#25), until this is clarified please assume that the center of the 'field of view' is located at:
An example file on ROGER that you can start with is at /gpfs/largeblockFS/projects/arpae/terraref/raw_data/ua-mac/MovingSensor/ps2Top/2016-05-07/2016-05-07__15-58-43-382/36dfd7fe-e648-427d-b503-fdf47f198545_metadata.json
Reported Z in metadata is calculated from following equation.
ZHeightInM = 2.0f //focal length
Context
This feature will be required to find all images based on location (e.g. those associated with a plant or plot)
others for comment: @robkooper @pless @solmazhajmohammadi
The text was updated successfully, but these errors were encountered: