Skip to content

Commit

Permalink
update to use go-whosonfirst-spatial/geo functions
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisaaronland committed Dec 7, 2020
1 parent 0a4a674 commit 5b213b6
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 10 deletions.
9 changes: 1 addition & 8 deletions api/parameters/parameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"errors"
"github.com/aaronland/go-http-sanitize"
"github.com/skelterjohn/geom"
geojson_utils "github.com/whosonfirst/go-whosonfirst-geojson-v2/utils"
"github.com/whosonfirst/go-whosonfirst-spatial/geo"
"net/http"
"strconv"
Expand Down Expand Up @@ -75,13 +74,7 @@ func Coordinate(req *http.Request) (*geom.Coord, error) {
return nil, err
}

coord, err := geojson_utils.NewCoordinateFromLatLons(lat, lon)

if err != nil {
return nil, err
}

return &coord, err
return geo.NewCoordinate(lon, lat)
}

func Properties(req *http.Request) ([]string, error) {
Expand Down
Binary file modified bin/go-bindata
Binary file not shown.
Binary file modified bin/go-bindata-assetfs
Binary file not shown.
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ require (
github.com/aaronland/go-http-tangramjs v0.0.7
github.com/rs/cors v1.7.0
github.com/skelterjohn/geom v0.0.0-20180103142417-96f3e8a219c5
github.com/whosonfirst/algnhsa v0.1.0 // indirect
github.com/whosonfirst/go-bindata v0.1.0
github.com/whosonfirst/go-bindata-assetfs v1.0.1
github.com/whosonfirst/go-whosonfirst-geojson-v2 v0.12.3
github.com/whosonfirst/go-whosonfirst-index v0.3.2
github.com/whosonfirst/go-whosonfirst-placetypes v0.2.4
github.com/whosonfirst/go-whosonfirst-spatial v0.0.4
Expand Down

0 comments on commit 5b213b6

Please sign in to comment.