Skip to content

Commit eede07a

Browse files
committed
provide examples
1 parent b5a001b commit eede07a

File tree

5 files changed

+5517
-1
lines changed

5 files changed

+5517
-1
lines changed

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
11
LibGEOS.jl
22
==========
3-
LibGEOS is a GPL-licensed package for manipulation and analysis of planar geometric objects, based on the libraries [GEOS](https://trac.osgeo.org/geos/) (the engine of PostGIS) and JTS (from which GEOS is ported). GEOS functionality is extensive, so coverage is incomplete, but the basic functionality for working with geospatial data is already available.
3+
LibGEOS is a GPL-licensed package for manipulation and analysis of planar geometric objects, based on the libraries [GEOS](https://trac.osgeo.org/geos/) (the engine of PostGIS) and JTS (from which GEOS is ported).
4+
5+
Among other things, it allows you to parse [Well-known Text (WKT)](https://en.wikipedia.org/wiki/Well-known_text)
6+
7+
```julia
8+
p1 = parseWKT("POLYGON((0 0,1 0,1 1,0 0))")
9+
p2 = parseWKT("POLYGON((0 0,1 0,1 1,0 1,0 0))")
10+
p3 = parseWKT("POLYGON((2 0,3 0,3 1,2 1,2 0))")
11+
```
12+
![Example 1](examples/example1.png)
13+
14+
Add a buffer around them
15+
```julia
16+
g1 = buffer(p1,0.5)
17+
g2 = buffer(p2,0.5)
18+
g3 = buffer(p3,0.5)
19+
```
20+
![Example 2](examples/example2.png)
21+
22+
and take the union of different geometries
23+
```julia
24+
polygon = union(buffer(p1,0.5),buffer(p3,0.5))
25+
```
26+
![Example 3](examples/example3.png)
27+
28+
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`.
429

530
Installation (on Linux and OS X)
631
------------

examples/example1.png

27.2 KB
Loading

examples/example2.png

23.4 KB
Loading

examples/example3.png

24.4 KB
Loading

examples/readme_examples.ipynb

Lines changed: 5491 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)