Skip to content

Commit c584725

Browse files
Update readme
1 parent 42d2fad commit c584725

File tree

1 file changed

+53
-27
lines changed

1 file changed

+53
-27
lines changed

README.md

Lines changed: 53 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,68 @@ Geo.jl brings together 10+ specialized geospatial packages, organized by functio
4646

4747
```julia
4848
using Pkg
49-
Pkg.add("Geo")
49+
# install packages into your current environment
50+
Pkg.add("Geo") # add Geo
51+
Pkg.add("CairoMakie") # add Plotting
5052
```
5153

5254
## Quick Start
53-
55+
### Raster data
5456
```julia
57+
# load a module
5558
using Geo
59+
using CairoMakie
5660

57-
# Now you have access to all JuliaGeo packages
58-
using ArchGDAL, GeoDataFrames, Rasters, GeoJSON
61+
# url to example raster file
62+
path2raster = "https://github.com/rasterio/rasterio/raw/9953b28225db3b01193c94b1442d34b828d374aa/tests/data/RGB2.byte.tif"
5963

6064
# Load a raster
61-
raster = Rasters.Raster("elevation.tif")
65+
ras = Geo.Raster(path2raster)
66+
67+
791×718×3 Raster{UInt8, 3} ┐
68+
├────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────── dims ┐
69+
X Projected{Float64} 101985.0:300.0379266750948:339014.9620733249 ForwardOrdered Regular Intervals{Start},
70+
Y Projected{Float64} 2.82661495821727e6:-300.04178272980505:2.611485e6 ReverseOrdered Regular Intervals{Start},
71+
↗ Band Categorical{Int64} 1:3 ForwardOrdered
72+
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── metadata ┤
73+
Metadata{Rasters.GDALsource} of Dict{String, Any} with 1 entry:
74+
"filepath" => "/vsicurl/https://github.com/rasterio/rasterio/raw/9953b28225db3b01193c94b1442d34b828d374aa/tests/data/RGB2.byte.tif"
75+
├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── raster ┤
76+
extent: Extent(X = (101985.0, 339315.0), Y = (2.611485e6, 2.826915e6), Band = (1, 3))
77+
crs: PROJCS["UTM Zone 18, Northern Hemisphere",GEOGCS["Unknown datum based upon the WGS 84 ellipsoid",DATUM["Not_specified_based_on_...
78+
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
79+
[:, :, 1]
80+
⋮ ⋱
81+
```
82+
83+
Plot Raster
84+
```julia
85+
heatmap(ras)
86+
```
87+
![Geo raster heatmap](https://private-user-images.githubusercontent.com/32276930/490279441-abcafbe2-1a5e-45d4-b4a0-bb6b1389b7d8.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTgwNjI0MzQsIm5iZiI6MTc1ODA2MjEzNCwicGF0aCI6Ii8zMjI3NjkzMC80OTAyNzk0NDEtYWJjYWZiZTItMWE1ZS00NWQ0LWI0YTAtYmI2YjEzODliN2Q4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA5MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwOTE2VDIyMzUzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA0ZmZkMjI2OTc3ZDlhN2RmY2MxMWIxOGMwYmYzZWY4NTZhOWEwZWQ2NTEyNWE2ZDI5MzZmOWEwOWQ4YjdhMDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.48M-_lFEpQ53QabEl1KPeiaf_Jrg3HZEDGcSnB0vUGs)
6288
63-
# Read a shapefile
64-
gdf = GeoDataFrames.read("data.shp")
89+
### Vector data
90+
```julia
91+
path2vector = "https://github.com/martynafford/natural-earth-geojson/raw/refs/heads/master/10m/physical/ne_10m_coastline.json"
92+
gdf = Geo.GeoDataFrames.read(path2vector)
93+
94+
Row │ geometry featurecla scalerank min_zoom
95+
│ IGeometr… String Int32 Float64
96+
──────┼──────────────────────────────────────────────────────────
97+
1 │ Geometry: wkbLineString Coastline 0 0.0
98+
2 │ Geometry: wkbLineString Coastline 0 0.0
99+
3 │ Geometry: wkbLineString Coastline 6 5.0
100+
⋮ │ ⋮ ⋮ ⋮ ⋮
101+
4132 │ Geometry: wkbLineString Coastline 6 0.5
102+
4133 │ Geometry: wkbLineString Coastline 6 4.0
103+
4128 rows omitted
104+
```
65105
66-
# Parse GeoJSON
67-
geojson = GeoJSON.read("features.geojson")
106+
Plot geometry
107+
```julia
108+
plot(gdf.geometry)
109+
```
110+
![Geo vector plot](https://private-user-images.githubusercontent.com/32276930/490280772-bf3ba00f-5eeb-491c-a187-f43282d0986c.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTgwNjI4MzQsIm5iZiI6MTc1ODA2MjUzNCwicGF0aCI6Ii8zMjI3NjkzMC80OTAyODA3NzItYmYzYmEwMGYtNWVlYi00OTFjLWExODctZjQzMjgyZDA5ODZjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA5MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwOTE2VDIyNDIxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdkMTMxMGFhYWJmMDU4OTdmYzUwZTFmM2QzMDU3YjU1MzQwYmU3YjZkMTQwYjgzZDdhNWI3ZmI4MWY4YTkyZjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Tkkvcx8zzxoCMjjlal2RrYubrPgdEmVakeimxuDrlfI)
68111
```
69112
70113
## Key Benefits
@@ -73,21 +116,4 @@ geojson = GeoJSON.read("features.geojson")
73116
- **Compatibility Guaranteed**: All packages are tested for compatibility
74117
- **Version Management**: Carefully curated version constraints prevent conflicts
75118
- **Complete Ecosystem**: Access to the full JuliaGeo toolkit
76-
- **Easy Updates**: Update all geospatial packages together
77-
78-
79-
## Documentation
80-
81-
- [**Stable Documentation**](https://JuliaGeo.github.io/Geo.jl/stable/) - Latest stable release
82-
- [**Development Documentation**](https://JuliaGeo.github.io/Geo.jl/dev/) - Current development version
83-
84-
## License
85-
86-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
87-
88-
## Support
89-
90-
- **Documentation**: [JuliaGeo.github.io/Geo.jl](https://JuliaGeo.github.io/Geo.jl/)
91-
- **Issues**: [GitHub Issues](https://github.com/JuliaGeo/Geo.jl/issues)
92-
- **Discussions**: [GitHub Discussions](https://github.com/JuliaGeo/Geo.jl/discussions)
93-
- **Julia Discourse**: [JuliaGeo category](https://discourse.julialang.org/c/domain/geo)
119+
- **Easy Updates**: Update all geospatial packages together

0 commit comments

Comments
 (0)