Documentation
¶
Overview ¶
Package esri handles interaction with GIS servers. Specifically, it provides functions which act on PAGIS.org web services and littlerock.gov servers. This includes: - Geocoding - Obtaining land parcel geometry - Finding flood hazard areas within a geometric envelope - Finding streets and their classification within an envelope - Finding zoning classification of a parcel There are a large number of mostly redundant structs which exist to keep some coherence of the highly varied JSON responses which the GIS servers provide to the queries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchCases ¶
FetchCases returns all the case files associated with a parcel. TODO: fetch a list of cases instead of the first
func FetchMap ¶
FetchMap takes ring geometry as an argument, calculates the coordinates of an envelope with a 10% buffer and makes a GET request to the PAGIS server for a png image of the area.
func FetchZone ¶
FetchZone takes an envelope (two points defining a rectangle which enclose a parcel) and returns a Zone, which is a code for land uses permitted by municipal ordinance. example:
R2 - single family residential PRD - Planned Residential Development
func IsMultifam ¶
IsMultifam is a trivial function to determine if zoning is multifamily (ie) anything zoned M24, etc. Does not capture planned residential developments which would require deep inspection of zoning files.
Types ¶
type Envelope ¶
Envelope is a pair of coordinate points which describe the lower-left and upper-right corners of a rectangle on a map.
func MakeEnvelope ¶
MakeEnvelope takes a geometry ring and a buffer radius (relative distance) as
arguments, then calculates a rectangular bounding box which encloses the
ring enlarged by the buffer TODO: This needs a sensible failure mechanism
type FloodHaz ¶
type FloodHaz int
FloodHaz is an enumeration of valid flood hazard area designations. Its use is an alternative to a hashmap
Flood Hazard Area classifications
type PResponse ¶
type PResponse struct { Displayfieldname string `json:"displayFieldName"` Fieldaliases fieldAliases `json:"fieldAliases"` Geometrytype string `json:"geometryType"` Spatialreference spatialReference `json:"spatialReference"` Features []features `json:"features"` }
PResponse is a wrapper for the response to queries to the esri server for parcel data.
func FetchByPID ¶
FetchByPID is an analog of FetchParcel; however, instead of taking a location it takes a parcel ID string
func FetchParcel ¶
FetchParcel takes a location ie {x:float64,Y:float64} and returns the first ESRI "ring" object given by the PAGIS REST API. A ring is a 2-dimensional array of x,y coordinates which describe the points of a (irregular) polygon. FetchParcel also retunrs a float64 (acres) because
type Street ¶
type Street struct { Name string Class StreetClass Row int Alt bool ARDOT bool }
Street refers to a specific road
func FetchRoads ¶
FetchRoads takes an envelope as an argument and returns a list of street names and their classifications. TODO: this is HIGHLY sensitive to the envelope buffer. Absolute widths are probably necessary.
type StreetClass ¶
type StreetClass int
const ( Residential StreetClass = iota MinorResidential Collector Commercial MinorArterial Arterial )
Street classifications. Residential and minor residential aren't queryable so there may be no way to get this to work.
func (StreetClass) String ¶
func (i StreetClass) String() string