Skip to content

Commit 2be8b7b

Browse files
authored
Merge pull request #2 from JuliaGeo/remove_projection
Remove projection
2 parents 285866a + f4c5b14 commit 2be8b7b

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ language: julia
33
os:
44
- linux
55
- osx
6+
- windows
67
julia:
78
- 1.0
9+
- 1.2
810
- nightly
911
matrix:
1012
allow_failures:

src/GeoFormatTypes.jl

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,9 @@ export AbstractWellKnownText, WellKnownText, WellKnownText2, ESRIWellKnownText,
1919

2020
const PROJ_PREFIX = "+proj="
2121
const EPSG_PREFIX = "EPSG:"
22+
# TODO more verification that types are wrapping the right format.
2223

2324

24-
"""
25-
projection(f::GeoFormat)
26-
27-
Get the projection of a GeoFormat type. This may be itself
28-
for [`CoordinateReferenceSystemFormat`](@ref) or a projection explicitly
29-
connected to another format type for [`GeometryFormat`](@ref).
30-
It may need to be parsed for some [`MixedFormat`](@ref).
31-
"""
32-
function projection end
3325

3426
"""
3527
val(f::GeoFormat)
@@ -48,8 +40,6 @@ Formats representing coordinate reference systems
4840
"""
4941
abstract type CoordinateReferenceSystemFormat <: GeoFormat end
5042

51-
projection(f::CoordinateReferenceSystemFormat) = f
52-
5343
"""
5444
Formats representing geometries. These wrappers simply mark string
5545
formats that may optionally be converted to Geoetry objects at a later point.
@@ -85,8 +75,6 @@ represent coordinate reference systems or geometric data.
8575
"""
8676
abstract type AbstractWellKnownText <: MixedFormat end
8777

88-
projection(f::AbstractWellKnownText) = f
89-
9078
"""
9179
Well known text v1 following the OGC standard
9280
"""
@@ -119,7 +107,8 @@ Base.convert(::Type{String}, input::WellKnownBinary) = error("`convert` is not d
119107

120108

121109
"""
122-
EPSG code representing a projection from the EPSG spatial reference system registry.
110+
EPSG code representing a coordinate reference system from the
111+
EPSG spatial reference system registry.
123112
"""
124113
struct EPSG <: CoordinateReferenceSystemFormat
125114
val::Int
@@ -145,24 +134,18 @@ struct KML <: GeometryFormat
145134
val::String
146135
end
147136

148-
projection(f::KML) = EPSG(4326)
149-
150137
"""
151138
Geography Markup Language
152139
"""
153140
struct GML <: MixedFormat
154141
val::String
155142
end
156143

157-
projection(f::GML) = error("No parser provided to get projection from GML")
158-
159144
"""
160145
GeoJSON String or Dict
161146
"""
162147
struct GeoJSON{T} <: GeometryFormat
163148
val::T
164149
end
165150

166-
projection(f::GeoJSON) = EPSG(4326)
167-
168151
end # module

0 commit comments

Comments
 (0)