diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 3eaf2ae..c44ac4c 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.2","generation_timestamp":"2025-01-11T12:08:50","documenter_version":"1.8.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.2","generation_timestamp":"2025-01-11T12:38:25","documenter_version":"1.8.0"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index eaca49d..8e681aa 100644 --- a/dev/index.html +++ b/dev/index.html @@ -2,31 +2,31 @@ GeoFormatTypes.jl · GeoFormatTypes.jl

GeoFormatTypes.jl

GeoFormatTypes.GeoFormatTypesModule

GeoFormatTypes

Stable Dev CI

GeoFormatTypes defines wrapper types to make it easy to pass and dispatch on geographic formats like Well Known Text or GeoJSON between packages. This way information about what format is contained is kept for later use, - instead of passing a String or Int that could mean anything.

Wrapper types also allow methods such as convert to work with data in multiple formats, instead of defining lists of format-specific handling methods. Currently ArchGDAL.jl is privileged to define convert methods for GeoFormatTypes.jl objects, using GDAL. When it is loaded, objects can be converted from one format to another:

julia> using GeoFormatTypes, ArchGDAL
 
 julia> convert(WellKnownText, EPSG(4326))
-WellKnownText{GeoFormatTypes.CRS, String}(GeoFormatTypes.CRS(), "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]")

ArchGDAL.jl is not a direct dependency of GeoFormatTypes.jl, so small packages that handle geospatial formats in some way can depend on GeoFormatTypes.jl without worry about large dependencies.

One complexity of GeoFormat objects is that some formats can hold either CRS (Coordinate Reference System) or geometric data, or even both at the same time.

This is handled using the CRS, Geom and Mixed traits. When the contents are explicitly known to be e.g. crs data, then CRS can be used, for example with all types of well known text:

crs = WellKnownText2(CRS(), crs_string)

If the contents are not known, the default Mixed() will mostly do the right thing anyway - it can be converted to either CRS or geometry formats using convert, given that it is actually possible to do with the contained data.

We thank Julia Computing for supporting contributions to this package.

source
GeoFormatTypes.AbstractWellKnownTextType
AbstractWellKnownText <: MixedFormat

Well known text has a number of versions and standards, and can hold either coordinate reference systems or geometric data in string format.

source
GeoFormatTypes.CRSType
CRS <: FormatMode
+WellKnownText{GeoFormatTypes.CRS, String}(GeoFormatTypes.CRS(), "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]")

ArchGDAL.jl is not a direct dependency of GeoFormatTypes.jl, so small packages that handle geospatial formats in some way can depend on GeoFormatTypes.jl without worry about large dependencies.

One complexity of GeoFormat objects is that some formats can hold either CRS (Coordinate Reference System) or geometric data, or even both at the same time.

This is handled using the CRS, Geom and Mixed traits. When the contents are explicitly known to be e.g. crs data, then CRS can be used, for example with all types of well known text:

crs = WellKnownText2(CRS(), crs_string)

If the contents are not known, the default Mixed() will mostly do the right thing anyway - it can be converted to either CRS or geometry formats using convert, given that it is actually possible to do with the contained data.

We thank Julia Computing for supporting contributions to this package.

source
GeoFormatTypes.AbstractWellKnownTextType
AbstractWellKnownText <: MixedFormat

Well known text has a number of versions and standards, and can hold either coordinate reference systems or geometric data in string format.

source
GeoFormatTypes.EPSGType
EPSG <: CoordinateReferenceSystemFormat
+CoordSys(val)

Wrapper for a Mapinfo CoordSys string.

source
GeoFormatTypes.EPSGType
EPSG <: CoordinateReferenceSystemFormat
 
-EPSG(input)

EPSG code representing a coordinate reference system from the EPSG spatial reference system registry.

String input must start with "EPSG:". EPSG can be converted to an Int or String using convert, or another CoordinateReferenceSystemFormat when ArchGDAL.jl is loaded.

source
GeoFormatTypes.ESRIWellKnownTextType
ESRIWellKnownText <: AbstractWellKnownText
+EPSG(input)

EPSG code representing a coordinate reference system from the EPSG spatial reference system registry.

String input must start with "EPSG:". EPSG can be converted to an Int or String using convert, or another CoordinateReferenceSystemFormat when ArchGDAL.jl is loaded.

source
GeoFormatTypes.ESRIWellKnownTextType
ESRIWellKnownText <: AbstractWellKnownText
 
 ESRIWellKnownText(x::String)
 ESRIWellKnownText(::CRS, x::String)
-ESRIWellKnownText(::Geom, x::String)

Wrapper for Well-known text strings, following the ESRI standard.

These may hold CRS or geometry data. The default mode is Unknown, and conversions to either type will be attempted where possible. A specific type can be specified if it is known, e.g:

crs = ESRIWellKnownText(CRS(), crs_string)
source
GeoFormatTypes.ExtendedType
Extended <: MixedFormatMode <: FormatMode
+ESRIWellKnownText(::Geom, x::String)

Wrapper for Well-known text strings, following the ESRI standard.

These may hold CRS or geometry data. The default mode is Unknown, and conversions to either type will be attempted where possible. A specific type can be specified if it is known, e.g:

crs = ESRIWellKnownText(CRS(), crs_string)
source
GeoFormatTypes.ExtendedType
Extended <: MixedFormatMode <: FormatMode
 
-Extended()

Trait specifying that a mixed format object, like WellKnownText, contains both geometry and coordinate reference system.

source
GeoFormatTypes.GMLType
GML <: MixedFormat

Wrapper for Geography Markup Language string.

These contain geometry data, but may also have embedded crs information. GML can be converted to either a GeometryFormat or CoordinateReferenceSystemFormat.

source
GeoFormatTypes.GeoJSONType
GeoJSON <: GeometryFormat

Wrapper for a GeoJSON String or Dict.

Conversion between Dict and String values is not yet handled.

source
GeoFormatTypes.GMLType
GML <: MixedFormat

Wrapper for Geography Markup Language string.

These contain geometry data, but may also have embedded crs information. GML can be converted to either a GeometryFormat or CoordinateReferenceSystemFormat.

source
GeoFormatTypes.GeoJSONType
GeoJSON <: GeometryFormat

Wrapper for a GeoJSON String or Dict.

Conversion between Dict and String values is not yet handled.

source
GeoFormatTypes.GeometryFormatType
GeometryFormat <: GeoFormat

Formats representing geometries. These wrappers simply mark string formats that may optionally be converted to Geoetry objects at a later point.

source
GeoFormatTypes.KMLType
KML <: GeometryFormat

Wrapper object for "Keyhole Markup Language" (KML) strings.

See: https://www.ogc.org/standards/kml/

Can be converted to a String. Conversion to crs will convert from EPSG(4326), which is the default for KML.

source
GeoFormatTypes.GeometryFormatType
GeometryFormat <: GeoFormat

Formats representing geometries. These wrappers simply mark string formats that may optionally be converted to Geoetry objects at a later point.

source
GeoFormatTypes.KMLType
KML <: GeometryFormat

Wrapper object for "Keyhole Markup Language" (KML) strings.

See: https://www.ogc.org/standards/kml/

Can be converted to a String. Conversion to crs will convert from EPSG(4326), which is the default for KML.

source
GeoFormatTypes.ProjStringType
ProjString <: CoordinateReferenceSystemFormat
 
-ProjString(x::String)

Wrapper for Proj strings. String input must start with "+proj=".

source
GeoFormatTypes.UnknownType
Unknown <: MixedFormatMode <: FormatMode
+ProjString(x::String)

Wrapper for Proj strings. String input must start with "+proj=".

source
GeoFormatTypes.UnknownType
Unknown <: MixedFormatMode <: FormatMode
 
-Unknown()

Trait specifying that for a mixed format object, like WellKnownText, it is unknown whether it stores geometry or coordinate reference system data, or both.

source
GeoFormatTypes.WellKnownBinaryType
WellKnownBinary <: MixedFormat

Wrapper for Well-known binary (WKB) objects.

These may hold CRS or geometry data. The default mode is Unknown, and conversions to either type will be attempted where possible. A specific type can be specified if it is known, e.g:

crs = WellKnownBinary(CRS(), crs_blob)
source
GeoFormatTypes.WellKnownTextType
WellKnownText <: AbstractWellKnownText
+Unknown()

Trait specifying that for a mixed format object, like WellKnownText, it is unknown whether it stores geometry or coordinate reference system data, or both.

source
GeoFormatTypes.WellKnownBinaryType
WellKnownBinary <: MixedFormat

Wrapper for Well-known binary (WKB) objects.

These may hold CRS or geometry data. The default mode is Unknown, and conversions to either type will be attempted where possible. A specific type can be specified if it is known, e.g:

crs = WellKnownBinary(CRS(), crs_blob)
source
GeoFormatTypes.WellKnownTextType
WellKnownText <: AbstractWellKnownText
 
 WellKnownText(val)
-WellKnownText(mode, val)

Wrapper for Well-known text (WKT) v1, following the OGC standard. These may hold CRS or geometry data.

These may hold CRS or geometry data. The default mode is Mixed(), and conversions to either type will be attempted where possible. A specific type can be specified if it is known, e.g.:

geom = WellKnownText(Geom(), geom_string)
source
GeoFormatTypes.WellKnownText2Type
WellKnownText2 <: AbstractWellKnownText
+WellKnownText(mode, val)

Wrapper for Well-known text (WKT) v1, following the OGC standard. These may hold CRS or geometry data.

These may hold CRS or geometry data. The default mode is Mixed(), and conversions to either type will be attempted where possible. A specific type can be specified if it is known, e.g.:

geom = WellKnownText(Geom(), geom_string)
source
GeoFormatTypes.WellKnownText2Type
WellKnownText2 <: AbstractWellKnownText
 
 WellKnownText2(val)
-WellKnownText2(mode, val)

Wrapper for Well-known text v2 objects, following the new OGC standard.

These may hold CRS or geometry data. The default mode is Unknown(), and conversions to either type will be attempted where possible. A specific type can be specified if it is known, e.g.:

crs = WellKnownText2(CRS(), crs_string)
source
+WellKnownText2(mode, val)

Wrapper for Well-known text v2 objects, following the new OGC standard.

These may hold CRS or geometry data. The default mode is Unknown(), and conversions to either type will be attempted where possible. A specific type can be specified if it is known, e.g.:

crs = WellKnownText2(CRS(), crs_string)
source
GeoFormatTypes.valFunction
val(f::GeoFormat)

Get the contained value of a GeoFormat type.

source
diff --git a/dev/objects.inv b/dev/objects.inv index e4d5bea..0db4efa 100644 --- a/dev/objects.inv +++ b/dev/objects.inv @@ -1,6 +1,6 @@ # Sphinx inventory version 2 # Project: GeoFormatTypes.jl -# Version: 0.4.2 +# Version: 0.4.3 # The remainder of this file is compressed using zlib. xAO1&zDܐ QX$[Lm"fq&__^__ZTvlR;@Û_|l7j\~qR#~/H'bG8@e%1l[7~,n.s>&!{C(X t24Yȸ 8Yҋb)ɉYn]"*3]>]w ، s]> @OK-ךwI**VHK Og \ No newline at end of file