You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.
Looking at the metadata from the latest Dorian PRN project the metadata names have changed from lat_min to //lat_min, lon_min to //lon_min, etc... Additionally it looks like the get_lat_coords_from_pixels has the interp1d function the wrong way around.
On Panoptes the classifications use SVG coordinates that has (0,0) in the upper left of the image as opposed to lat-lon coordinates that would have the origin in the lower left. For the drawn points the min value will always be 0 and the max value will be determined by the size of the images uploaded, minus any parts are the bottom added for the "before" and "after" labels. This pixel size can be pulled from the //tifsize_x_pix and //tifsize_y_pix metadata.
Taking this into account the updated lat and lon conversion code should look like:
defget_lat_coords_from_pixels(marks, geo_metadata):
try:
the_y=np.array([0, geo_metadata['//tifsize_y_pix']], dtype=float)
the_lat=np.array([geo_metadata['//lat_max'], geo_metadata['//lat_min']], dtype=float)
exceptKeyErrorase:
# missing data for the converstion to lat / lonraiseMissingCoordinateMetadata(str(e))
# setup interpolation functions to get the lat / lon from pixel marks# don't throw an error if the coords are out of bounds, but also don't extrapolatef_y_lat=interp1d(the_y, the_lat, bounds_error=False, fill_value=(None, None))
returnf_y_lat(marks)
defget_lon_coords_from_pixels(marks, geo_metadata):
try:
the_x=np.array([0, geo_metadata['//tifsize_x_pix']], dtype=float)
the_lon=np.array([geo_metadata['//lon_min'], geo_metadata['//lon_max']], dtype=float)
exceptKeyErrorase:
# missing data for the converstion to lat / lonraiseMissingCoordinateMetadata(str(e))
# setup interpolation functions to get the lat / lon from pixel marks# don't throw an error if the coords are out of bounds, but also don't extrapolatef_x_lon=interp1d(the_x, the_lon, bounds_error=False, fill_value=(None, None))
returnf_x_lon(marks)
The text was updated successfully, but these errors were encountered:
Looking at the metadata from the latest Dorian PRN project the metadata names have changed from
lat_min
to//lat_min
,lon_min
to//lon_min
, etc... Additionally it looks like theget_lat_coords_from_pixels
has theinterp1d
function the wrong way around.On Panoptes the classifications use SVG coordinates that has
(0,0)
in the upper left of the image as opposed to lat-lon coordinates that would have the origin in the lower left. For the drawn points the min value will always be0
and the max value will be determined by the size of the images uploaded, minus any parts are the bottom added for the "before" and "after" labels. This pixel size can be pulled from the//tifsize_x_pix
and//tifsize_y_pix
metadata.Taking this into account the updated lat and lon conversion code should look like:
The text was updated successfully, but these errors were encountered: