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
* switch to re-entrant methods
we switch from GEOSconnection (with a `status::Symbol`) to GEOScontext
(with a `ptr::GEOSContextHandle_t`), since the former is deprecated for
the latter. This change only applies to everything after GEOS v3.5.0.
There will be a global-level `_context` object that is passed to every
method to maintain the same behavior for now. We might want to also
provide methods that allows users to pass in their own context, and
fallback on the global _context object otherwise.
* expose `context::GEOScontext` as an optional argument to all methods
* switch to WK*Reader and WK*Writer style methods
- introduced `WKTReader`, `WKBReader`, `WKTWriter` and `WKBWriter` types
- we should be promoting the Julian (wrapper) geometry types through
`readgeom` and `writegeom`, rather than encouraging the C-pointers in
`_readgeom` and `_writegeom`
- the corresponding changes are `parseWKT` -> `readgeom`, `geomFromWKT`
-> `_readgeom`, and `geomToWKT` -> `_writegeom`
- moved the `GEOMTYPE` dict into `src/geos_operations.jl` since
`src/geos_functions.jl` is meant more for a direct 1-1 mapping with the
corresponding C functions
* bugfix
* remove module readers and writers in favor of ones local to methods
* update docs
* add deprecated functions
for a smoother transition
* GEOScontext -> GEOSContext
* test readgeom instead of _readgeom
* bugfix
Copy file name to clipboardExpand all lines: README.md
+11-16Lines changed: 11 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,42 +9,37 @@ LibGEOS is a LGPL-licensed package for manipulation and analysis of planar geome
9
9
Among other things, it allows you to parse [Well-known Text (WKT)](https://en.wikipedia.org/wiki/Well-known_text)
10
10
11
11
```julia
12
-
p1 =parseWKT("POLYGON((0 0,1 0,1 1,0 0))")
13
-
p2 =parseWKT("POLYGON((0 0,1 0,1 1,0 1,0 0))")
14
-
p3 =parseWKT("POLYGON((2 0,3 0,3 1,2 1,2 0))")
12
+
p1 =readgeom("POLYGON((0 0,1 0,1 1,0 0))")
13
+
p2 =readgeom("POLYGON((0 0,1 0,1 1,0 1,0 0))")
14
+
p3 =readgeom("POLYGON((2 0,3 0,3 1,2 1,2 0))")
15
15
```
16
16

17
17
18
18
Add a buffer around them
19
19
```julia
20
-
g1 =buffer(p1,0.5)
21
-
g2 =buffer(p2,0.5)
22
-
g3 =buffer(p3,0.5)
20
+
g1 =buffer(p1,0.5)
21
+
g2 =buffer(p2,0.5)
22
+
g3 =buffer(p3,0.5)
23
23
```
24
24

25
25
26
26
and take the union of different geometries
27
27
```julia
28
-
polygon =union(buffer(p1,0.5),buffer(p3,0.5))
28
+
polygon =LibGEOS.union(g1, g3)
29
29
```
30
30

31
31
32
32
GEOS functionality is extensive, so coverage is incomplete, but the basic functionality for working with geospatial data is already available. I'm learning as I go along, so documentation is lacking, but if you're interested, you can have a look at the examples in the `examples/` folder, or the tests in `test/test_geo_interface.jl` and `test/test_geos_operations.jl`.
33
33
34
-
Installation (on Linux and OS X)
34
+
Installation
35
35
------------
36
-
1. First, install a copy of GEOS, and point the `LD_LIBRARY_PATH` (Linux) or `DYLD_LIBRARY_PATH` (OS X) variable to the GEOS library by adding, e.g.,
0 commit comments