All Projects → hishamkaram → Geoserver

hishamkaram / Geoserver

Licence: mit
geoserver is a Go library for manipulating a GeoServer instance via the GeoServer REST API.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Geoserver

Microsoft.SqlServer.Types
a .NET Standard implementation of the spatial types in `Microsoft.SqlServer.Types`
Stars: ✭ 64 (+33.33%)
Mutual labels:  mapping, gis, geography
rafagas
Daily geospatial links curated by Raf Roset
Stars: ✭ 17 (-64.58%)
Mutual labels:  gis, geography
FlowMaps
No description or website provided.
Stars: ✭ 13 (-72.92%)
Mutual labels:  mapping, gis
Igo2
Assemblage (IGO2) / Open GIS Infrastructure 2.0
Stars: ✭ 36 (-25%)
Mutual labels:  gis, mapping
WhirlyGlobe
WhirlyGlobe Development
Stars: ✭ 767 (+1497.92%)
Mutual labels:  mapping, gis
turf-go
A Go language port of Turf.js
Stars: ✭ 41 (-14.58%)
Mutual labels:  gis, geography
Osmnx
OSMnx: Python for street networks. Retrieve, model, analyze, and visualize street networks and other spatial data from OpenStreetMap.
Stars: ✭ 3,357 (+6893.75%)
Mutual labels:  gis, geography
leafmap
A Python package for interactive mapping and geospatial analysis with minimal coding in a Jupyter environment
Stars: ✭ 1,299 (+2606.25%)
Mutual labels:  mapping, gis
Awesome Gee
A curated list of Google Earth Engine resources
Stars: ✭ 292 (+508.33%)
Mutual labels:  gis, mapping
Mapsui
Mapsui is a .NET Map component for WPF, Xamarin.Forms, Xamarin.Android, Xamarin.iOS and UWP
Stars: ✭ 447 (+831.25%)
Mutual labels:  gis, mapping
Iclient Javascript
Modern GIS Web Client for JavaScript, based on Leaflet\OpenLayers\MapboxGL-JS\Classic(iClient8C), enhanced with ECharts\D3\MapV etc. Contributed by SuperMap & community.
Stars: ✭ 593 (+1135.42%)
Mutual labels:  gis, mapping
Arcgis Python Api
Documentation and samples for ArcGIS API for Python
Stars: ✭ 954 (+1887.5%)
Mutual labels:  gis, mapping
Geemap
A Python package for interactive mapping with Google Earth Engine, ipyleaflet, and folium
Stars: ✭ 959 (+1897.92%)
Mutual labels:  gis, mapping
awesome-maps-ukraine
A curated list of maps of Ukraine, ukrainian mappers and tools that they use or develop for creating and publish maps
Stars: ✭ 35 (-27.08%)
Mutual labels:  mapping, gis
python-for-gis-progression-path
Progression path for a GIS analyst who wants to become proficient in using Python for GIS: from apprentice to guru
Stars: ✭ 98 (+104.17%)
Mutual labels:  gis, geography
shadow-accrual-maps
Accumulated shadow data computed for New York City
Stars: ✭ 15 (-68.75%)
Mutual labels:  gis, geography
esri-experiments
Fly in space and look across the sea: demos and experiments with the ArcGIS API for JavaScript
Stars: ✭ 29 (-39.58%)
Mutual labels:  mapping, geography
GMT.jl
Generic Mapping Tools Library Wrapper for Julia
Stars: ✭ 148 (+208.33%)
Mutual labels:  mapping, gis
Mapnik
Mapnik is an open source toolkit for developing mapping applications
Stars: ✭ 3,067 (+6289.58%)
Mutual labels:  gis, mapping
Geography for hackers
Geography for Hackers - Teaching all how to hack geography, use GIS, and think spatially
Stars: ✭ 25 (-47.92%)
Mutual labels:  gis, geography

Go Report Card GitHub license GitHub issues Coverage Status Build Status Documentation GitHub forks GitHub stars Twitter

Geoserver

geoserver Is a Go Package For Manipulating a GeoServer Instance via the GeoServer REST API.


How to install:

  • go get -v gopkg.in/hishamkaram/geoserver.v1
    • now you can import the package from gopkg.in/hishamkaram/geoserver.v1, example:
      import (
        ...
        "gopkg.in/hishamkaram/geoserver.v1"
        ...
      )
      

usage:

  • Create new Catalog (which contains all available operations):
    • gsCatalog := geoserver.GetCatalog("http://localhost:8080/geoserver13/", "admin", "geoserver")
  • Use catalog Methods to Perform a Geoserver REST Operation:
    • Create New workspace:
      created, err := gsCatalog.CreateWorkspace("golang")
      if err != nil {
        fmt.Printf("\nError:%s\n", err)
      }
      fmt.Println(strconv.FormatBool(created))
      
      output if created:
      INFO[31-03-2018 16:26:35] url:http://localhost:8080/geoserver13/rest/workspaces	response Status=201  
      true
      
      output if error:
      INFO[31-03-2018 16:26:37] url:http://localhost:8080/geoserver13/rest/workspaces	response Status=401  
      WARN[31-03-2018 16:26:37] <!doctype html><html lang="en"><head><title>HTTP Status 401 – Unauthorized</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 401 – Unauthorized</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> Workspace &#39;golang&#39; already exists</p><p><b>Description</b> The request has not been applied because it lacks valid authentication credentials for the target resource.</p><hr class="line" /><h3>Apache Tomcat/9.0.6</h3></body></html> 
      
      Error:Unauthorized
      false
      
  • Get Layers through GetLayers take workspace as paramter if empty workspace will be ignored and geoserver will return all public layers
    layers, err := gsCatalog.GetLayers("")
    if err != nil {
      fmt.Printf("\nError:%s\n", err)
    }
    for _, lyr := range layers {
      fmt.Printf("\nName:%s  href:%s\n", lyr.Name, lyr.Href)
    }
    
    output:
    INFO[31-03-2018 19:04:44] url:http://localhost:8080/geoserver13/rest/layers	response Status=200  
    
    Name🐯giant_polygon  href:http://localhost:8080/geoserver13/rest/layers/tiger%3Agiant_polygon.json
    
    Name🐯poi  href:http://localhost:8080/geoserver13/rest/layers/tiger%3Apoi.json
    
    Name🐯poly_landmarks  href:http://localhost:8080/geoserver13/rest/layers/tiger%3Apoly_landmarks.json
    
    Name🐯tiger_roads  href:http://localhost:8080/geoserver13/rest/layers/tiger%3Atiger_roads.json
    
    Name:nurc:Arc_Sample  href:http://localhost:8080/geoserver13/rest/layers/nurc%3AArc_Sample.json
    
    Name:nurc:Img_Sample  href:http://localhost:8080/geoserver13/rest/layers/nurc%3AImg_Sample.json
    
    Name:nurc:Pk50095  href:http://localhost:8080/geoserver13/rest/layers/nurc%3APk50095.json
    
    Name:nurc:mosaic  href:http://localhost:8080/geoserver13/rest/layers/nurc%3Amosaic.json
    ......
    
  • Get Specific Layer from Geoserver:
    layer, err := gsCatalog.GetLayer("nurc", "Arc_Sample")
    if err != nil {
      fmt.Printf("\nError:%s\n", err)
    } else {
      fmt.Printf("%+v\n", layer)
    }
    
    output:
    INFO[31-03-2018 20:12:07] url:http://localhost:8080/geoserver13/rest/workspaces/nurc/layers/Arc_Sample	response Status=200  
    {Name:Arc_Sample Path:/ Type:RASTER DefaultStyle:{Class: Name:rain Href:http://localhost:8080/geoserver13/rest/styles/rain.json} Styles:{Class:linked-hash-set Style:[{Class: Name:raster Href:http://localhost:8080/geoserver13/rest/styles/raster.json}]} Resource:{Class:coverage Name:nurc:Arc_Sample Href:http://localhost:8080/geoserver13/rest/workspaces/nurc/coveragestores/arcGridSample/coverages/Arc_Sample.json} Queryable:false Opaque:false Attribution:{Title: Href: LogoURL: LogoType: LogoWidth:0 LogoHeight:0}}
    
  • You can find more examples by check testing files
  • You can find all supported operations on Godocs

TESTING

Go Version Geoserver Version Tested
1 1.11.x 2.13.x ✔️
2 1.11.x 2.14.x ✔️
3 1.12.x 2.13.x ✔️
4 1.12.x 2.14.x ✔️
5 1.13.x 2.13.x ✔️
6 1.13.x 2.14.x ✔️

Documentation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].