Skip to content

Commit

Permalink
Add docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
eliascarv committed Nov 13, 2024
1 parent ac1bbf9 commit 6da3f2b
Showing 1 changed file with 51 additions and 5 deletions.
56 changes: 51 additions & 5 deletions src/geokeys.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,15 @@
ProjScaleAtCenterGeoKey = 3093
end

# Corresponding names in the GeoTIFF specification:
# id - KeyID
# tag - TIFFTagLocation
# count - Count
# value - ValueOffset
"""
GeoTIFF.GeoKey(id, tag, count, value)
GeoKey Entry with KeyID `id`, TIFFTagLocation `tag`, Count `count`
and ValueOffset `value`.
See [Requirements Class GeoKeyDirectoryTag](https://docs.ogc.org/is/19-008r4/19-008r4.html#_requirements_class_geokeydirectorytag)
section of the GeoTIFF Spec for a explanation of each field.
"""
struct GeoKey
id::GeoKeyID
tag::UInt16
Expand All @@ -63,14 +67,56 @@ struct GeoKey
end

# generic values

"""
GeoTIFF.Undefined
GeoKey value that indicate intentionally omitted parameters.
"""
const Undefined = UInt16(0)

"""
GeoTIFF.UserDefined
GeoKey value that indicate user defined parameters.
"""
const UserDefined = UInt16(32767)

# GTRasterTypeGeoKey values

"""
GeoTIFF.PixelIsArea
PixelIsArea raster type, i.e each pixel of the image is a grid element.
"""
const PixelIsArea = UInt16(1)

"""
GeoTIFF.PixelIsPoint
PixelIsPoint raster type, i.e each pixel of the image is a grid vertex.
"""
const PixelIsPoint = UInt16(2)

# GTModelTypeGeoKey values

"""
GeoTIFF.Projected2D
Projected CRS model type.
"""
const Projected2D = UInt16(1)

"""
GeoTIFF.Geographic2D
Geographic 2D CRS model type.
"""
const Geographic2D = UInt16(2)

"""
GeoTIFF.Geocentric3D
Geocentric 3D CRS model type.
"""
const Geocentric3D = UInt16(3)

0 comments on commit 6da3f2b

Please sign in to comment.