Skip to content

Commit 929a4fa

Browse files
committed
drop julia v0.4, fix dep warns for v0.6
1 parent 549c6cb commit 929a4fa

File tree

10 files changed

+61
-71
lines changed

10 files changed

+61
-71
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ os:
33
- osx
44
- linux
55
julia:
6-
- 0.4
76
- 0.5
7+
- 0.6
88
- nightly
99
matrix:
1010
allow_failures:
11-
- julia: nightly
11+
- julia: nightly
1212
notifications:
1313
email: false
1414
script:

REQUIRE

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
julia 0.4
2-
Compat 0.8.7
3-
GeoInterface 0.1
1+
julia 0.5
2+
GeoInterface 0.2.1
43
BinDeps
54
@osx Homebrew
65
@windows WinRPM

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
environment:
22
matrix:
3-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.4/julia-0.4-latest-win32.exe"
4-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.4/julia-0.4-latest-win64.exe"
53
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.5/julia-0.5-latest-win32.exe"
64
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.5/julia-0.5-latest-win64.exe"
5+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
6+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
77
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
88
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
99

deps/build.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using BinDeps, Compat
1+
using BinDeps
22
@BinDeps.setup
33

44
libgeos = library_dependency("libgeos",aliases=["libgeos_c", "libgeos_c-1"], validate = function(path, handle)

src/LibGEOS.jl

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,9 @@ module LibGEOS
66
error("LibGEOS not properly installed. Please run Pkg.build(\"LibGEOS\")")
77
end
88

9-
using Compat, GeoInterface
9+
using GeoInterface
1010
import Base: contains
1111

12-
# normalize! was added in julia v0.5, for v0.4 extend Compat version
13-
if isdefined(Base, :normalize!)
14-
import Base: normalize!
15-
else
16-
import Compat: normalize!
17-
export normalize!
18-
end
19-
20-
2112
export Point, MultiPoint, LineString, MultiLineString, LinearRing, Polygon, MultiPolygon, GeometryCollection,
2213
parseWKT, geomFromWKT, geomToWKT,
2314
project, projectNormalized, interpolate, interpolateNormalized,

src/geo_interface.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ GeoInterface.coordinates(multipoint::MultiPoint) = Vector{Float64}[getCoordinate
2020
GeoInterface.coordinates(multiline::MultiLineString) = Vector{Vector{Float64}}[getCoordinates(getCoordSeq(geom)) for geom in getGeometries(multiline.ptr)]
2121
function GeoInterface.coordinates(multipolygon::MultiPolygon)
2222
geometries = getGeometries(multipolygon.ptr)
23-
coords = Array(Vector{Vector{Vector{Float64}}}, length(geometries))
23+
coords = Array{Vector{Vector{Vector{Float64}}}}(length(geometries))
2424
for (i,geom) in enumerate(getGeometries(multipolygon.ptr))
2525
exterior = getCoordinates(getCoordSeq(exteriorRing(geom)))
2626
interiors = [getCoordinates(getCoordSeq(ring)) for ring in interiorRings(geom)]

src/geos_c.jl

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# Contents of this file is generated. Do not edit by hand!
22

3-
typealias GEOSMessageHandler Ptr{Void}
4-
typealias GEOSGeometry Ptr{Void}
5-
typealias GEOSPreparedGeometry Ptr{Void}
6-
typealias GEOSCoordSequence Ptr{Void}
7-
typealias GEOSSTRtree Ptr{Void}
8-
typealias GEOSBufferParams Ptr{Void}
9-
typealias GEOSContextHandle_t Ptr{Void}
10-
typealias GEOSQueryCallback Ptr{Void}
11-
typealias GEOSInterruptCallback Ptr{Void}
12-
typealias GEOSWKTReader Ptr{Void}
13-
typealias GEOSWKTWriter Ptr{Void}
14-
typealias GEOSWKBReader Ptr{Void}
15-
typealias GEOSWKBWriter Ptr{Void}
3+
const GEOSMessageHandler = Ptr{Void}
4+
const GEOSGeometry = Ptr{Void}
5+
const GEOSPreparedGeometry = Ptr{Void}
6+
const GEOSCoordSequence = Ptr{Void}
7+
const GEOSSTRtree = Ptr{Void}
8+
const GEOSBufferParams = Ptr{Void}
9+
const GEOSContextHandle_t = Ptr{Void}
10+
const GEOSQueryCallback = Ptr{Void}
11+
const GEOSInterruptCallback = Ptr{Void}
12+
const GEOSWKTReader = Ptr{Void}
13+
const GEOSWKTWriter = Ptr{Void}
14+
const GEOSWKBReader = Ptr{Void}
15+
const GEOSWKBWriter = Ptr{Void}
1616

1717

18-
typealias GEOSGeom Ptr{GEOSGeometry};
19-
typealias GEOSCoordSeq Ptr{GEOSCoordSequence};
18+
const GEOSGeom = Ptr{GEOSGeometry}
19+
const GEOSCoordSeq = Ptr{GEOSCoordSequence}
2020

2121

2222

@@ -62,15 +62,15 @@ function GEOSContext_setErrorHandler_r(extHandle::GEOSContextHandle_t,ef::GEOSMe
6262
ccall((:GEOSContext_setErrorHandler_r,libgeos),GEOSMessageHandler,(GEOSContextHandle_t,GEOSMessageHandler),extHandle,ef)
6363
end
6464

65-
function GEOSGeomFromWKT(wkt::Compat.String)
65+
function GEOSGeomFromWKT(wkt::String)
6666
ccall((:GEOSGeomFromWKT,libgeos),Ptr{GEOSGeometry},(Ptr{UInt8},),wkt)
6767
end
6868

6969
function GEOSGeomToWKT(g::Ptr{GEOSGeometry})
7070
ccall((:GEOSGeomToWKT,libgeos),Ptr{UInt8},(Ptr{GEOSGeometry},),g)
7171
end
7272

73-
function GEOSGeomFromWKT_r(handle::GEOSContextHandle_t,wkt::Compat.String)
73+
function GEOSGeomFromWKT_r(handle::GEOSContextHandle_t,wkt::String)
7474
ccall((:GEOSGeomFromWKT_r,libgeos),Ptr{GEOSGeometry},(GEOSContextHandle_t,Ptr{UInt8}),handle,wkt)
7575
end
7676

src/geos_functions.jl

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ GEOMTYPE = Dict( GEOS_POINT => :Point,
1515
GEOS_GEOMETRYCOLLECTION => :GeometryCollection)
1616

1717

18-
function geomFromWKT(geom::Compat.String)
18+
function geomFromWKT(geom::String)
1919
result = GEOSGeomFromWKT(geom)
2020
if result == C_NULL
2121
error("LibGEOS: Error in GEOSGeomFromWKT")
@@ -108,7 +108,7 @@ function getZ!(ptr::GEOSCoordSeq, index::Integer, coord::Vector{Float64})
108108
result
109109
end
110110

111-
let out = Array(UInt32, 1)
111+
let out = Array{UInt32}(1)
112112
global getSize
113113
function getSize(ptr::GEOSCoordSeq)
114114
# Get size info from a Coordinate Sequence (Return 0 on exception)
@@ -120,7 +120,7 @@ let out = Array(UInt32, 1)
120120
end
121121
end
122122

123-
let out = Array(UInt32, 1)
123+
let out = Array{UInt32}(1)
124124
global getDimensions
125125
function getDimensions(ptr::GEOSCoordSeq)
126126
# Get dimensions info from a Coordinate Sequence (Return 0 on exception)
@@ -195,7 +195,7 @@ function createCoordSeq(coords::Vector{Vector{Float64}})
195195
coordinates
196196
end
197197

198-
let out = Array(Float64, 1)
198+
let out = Array{Float64}(1)
199199
global getX
200200
function getX(ptr::GEOSCoordSeq, i::Integer)
201201
getX!(ptr, i, out)
@@ -205,7 +205,7 @@ end
205205

206206
function getX(ptr::GEOSCoordSeq)
207207
ncoords = getSize(ptr)
208-
xcoords = Array(Float64, ncoords)
208+
xcoords = Array{Float64}(ncoords)
209209
start = pointer(xcoords)
210210
floatsize = sizeof(Float64)
211211
for i=0:ncoords-1
@@ -214,18 +214,18 @@ function getX(ptr::GEOSCoordSeq)
214214
xcoords
215215
end
216216

217-
let out = Array(Float64, 1)
217+
let out = Array{Float64}(1)
218218
global getY
219219
function getY(ptr::GEOSCoordSeq, i::Integer)
220-
out = Array(Float64, 1)
220+
out = Array{Float64}(1)
221221
getY!(ptr, i, out)
222222
out[1]
223223
end
224224
end
225225

226226
function getY(ptr::GEOSCoordSeq)
227227
ncoords = getSize(ptr)
228-
ycoords = Array(Float64, ncoords)
228+
ycoords = Array{Float64}(ncoords)
229229
start = pointer(ycoords)
230230
floatsize = sizeof(Float64)
231231
for i=0:ncoords-1
@@ -234,7 +234,7 @@ function getY(ptr::GEOSCoordSeq)
234234
ycoords
235235
end
236236

237-
let out = Array(Float64, 1)
237+
let out = Array{Float64}(1)
238238
global getZ
239239
function getZ(ptr::GEOSCoordSeq, i::Integer)
240240
getZ!(ptr, i, out)
@@ -244,7 +244,7 @@ end
244244

245245
function getZ(ptr::GEOSCoordSeq)
246246
ncoords = getSize(ptr)
247-
zcoords = Array(Float64, ncoords)
247+
zcoords = Array{Float64}(ncoords)
248248
start = pointer(zcoords)
249249
floatsize = sizeof(Float64)
250250
for i=0:ncoords-1
@@ -255,7 +255,7 @@ end
255255

256256
function getCoordinates(ptr::GEOSCoordSeq, i::Integer)
257257
ndim = getDimensions(ptr)
258-
coord = Array(Float64, ndim)
258+
coord = Array{Float64}(ndim)
259259
start = pointer(coord)
260260
floatsize = sizeof(Float64)
261261
GEOSCoordSeq_getX(ptr, i-1, start)
@@ -919,7 +919,7 @@ getGeometries(ptr::GEOSGeom) = GEOSGeom[getGeometry(ptr, i) for i=1:numGeometrie
919919

920920
# Converts Geometry to normal form (or canonical form).
921921
# Return -1 on exception, 0 otherwise.
922-
function normalize!(ptr::GEOSGeom)
922+
function Base.normalize!(ptr::GEOSGeom)
923923
result = GEOSNormalize(ptr)
924924
if result == -1
925925
error("LibGEOS: Error in GEOSNormalize")
@@ -946,7 +946,7 @@ function numPoints(ptr::GEOSGeom)
946946
end
947947

948948
# Return -1 on exception, Geometry must be a Point.
949-
let out = Array(Float64, 1)
949+
let out = Array{Float64}(1)
950950
global getGeomX
951951
function getGeomX(ptr::GEOSGeom)
952952
result = GEOSGeomGetX(ptr, pointer(out))
@@ -957,7 +957,7 @@ let out = Array(Float64, 1)
957957
end
958958
end
959959

960-
let out = Array(Float64, 1)
960+
let out = Array{Float64}(1)
961961
global getGeomY
962962
function getGeomY(ptr::GEOSGeom)
963963
result = GEOSGeomGetY(ptr, pointer(out))
@@ -1052,7 +1052,7 @@ end
10521052
# -----
10531053
# Misc functions
10541054
# -----
1055-
let out = Array(Float64, 1)
1055+
let out = Array{Float64}(1)
10561056
global geomArea
10571057
function geomArea(ptr::GEOSGeom)
10581058
# Return 0 on exception, 1 otherwise
@@ -1064,7 +1064,7 @@ let out = Array(Float64, 1)
10641064
end
10651065
end
10661066

1067-
let out = Array(Float64, 1)
1067+
let out = Array{Float64}(1)
10681068
global geomLength
10691069
function geomLength(ptr::GEOSGeom)
10701070
# Return 0 on exception, 1 otherwise
@@ -1076,7 +1076,7 @@ let out = Array(Float64, 1)
10761076
end
10771077
end
10781078

1079-
let out = Array(Float64, 1)
1079+
let out = Array{Float64}(1)
10801080
global geomDistance
10811081
function geomDistance(g1::GEOSGeom, g2::GEOSGeom)
10821082
# Return 0 on exception, 1 otherwise
@@ -1088,7 +1088,7 @@ let out = Array(Float64, 1)
10881088
end
10891089
end
10901090

1091-
let out = Array(Float64, 1)
1091+
let out = Array{Float64}(1)
10921092
global hausdorffdistance
10931093
function hausdorffdistance(g1::GEOSGeom, g2::GEOSGeom)
10941094
# Return 0 on exception, 1 otherwise
@@ -1100,7 +1100,7 @@ let out = Array(Float64, 1)
11001100
end
11011101
end
11021102

1103-
let out = Array(Float64, 1)
1103+
let out = Array{Float64}(1)
11041104
global hausdorffdistance
11051105
function hausdorffdistance(g1::GEOSGeom, g2::GEOSGeom, densifyFrac::Real)
11061106
# Return 0 on exception, 1 otherwise

src/geos_operations.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function geomFromGEOS(ptr::GEOSGeom)
2222
return GeometryCollection(ptr)
2323
end
2424
end
25-
parseWKT(geom::Compat.String) = geomFromGEOS(geomFromWKT(geom))
25+
parseWKT(geom::String) = geomFromGEOS(geomFromWKT(geom))
2626

2727
# -----
2828
# Linear referencing functions -- there are more, but these are probably sufficient for most purposes
@@ -288,11 +288,11 @@ isClosed(obj::LineString) = isClosed(obj.ptr) # Call only on LINESTRING
288288

289289
# Converts Geometry to normal form (or canonical form).
290290
for geom in (:Point, :MultiPoint, :LineString, :MultiLineString, :LinearRing, :Polygon, :MultiPolygon, :GeometryCollection)
291-
@eval normalize!(obj::$geom) = normalize!(obj.ptr)
291+
@eval Base.normalize!(obj::$geom) = normalize!(obj.ptr)
292292
end
293293

294294
# # Return -1 on exception, Geometry must be a Point.
295-
# let out = Array(Float64, 1)
295+
# let out = Array{Float64}(1)
296296
# global getGeomX
297297
# function getGeomX(ptr::GEOSGeom)
298298
# result = GEOSGeomGetX(ptr, pointer(out))
@@ -303,7 +303,7 @@ end
303303
# end
304304
# end
305305

306-
# let out = Array(Float64, 1)
306+
# let out = Array{Float64}(1)
307307
# global getGeomY
308308
# function getGeomY(ptr::GEOSGeom)
309309
# result = GEOSGeomGetY(ptr, pointer(out))

0 commit comments

Comments
 (0)