Giter Club home page Giter Club logo

api-specs's Introduction

title description
BC Government OpenAPI Specifications
A collection of BC Government hosted RESTFul API specifications.

Lifecycle

BC Govenment API Guidelines

BC Govenment API Guidelines

BC Government OpenAPI specs

DataBC offers an API management service for RESTful APIs owned and managed by the Province of BC.

This repo contains documentation and Open API Specification (AKA swagger specs) to support the API Management toolset. Open API definitions are also referenced in the respective metadata records for APIs in the BC Data Catalogue. https://catalogue.data.gov.bc.ca/group/bc-government-api-registry

Support Matrix

License

https://github.com/bcgov/api-specs/blob/master/LICENSE.md

api-specs's People

Contributors

aflyer avatar banders avatar bk01 avatar bolyachevets avatar brad-sparks-gov-bc-ca avatar cpf-bc avatar darv72 avatar dkelsey avatar gjlawran avatar ikethecoder avatar kathydo avatar ll911 avatar marcolussetti avatar michaelpnelson avatar pramsey avatar rfb avatar sjrumsby avatar stephenhillier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api-specs's Issues

Widen field type for EXECUTIONT in shapefile output

Currently EXECUTIONT is set as a number(7,3) in the DBF file of the shpz output format for a geocode. This only leaves space for properly reporting a max of 3 digits to the left of the decimal. For computation times exceeding a second, the value gets set to 9999999.

Not sure if this affects any other formats and resources, but at least for shapefiles this should be changed to at least number(9,3).

A slow-running test example is: UNIT 30 -- 2720 Mill Bay Rd, Mill Bay, BC

Cannot detect street name alias faults for Site-Name-based Matches

This is particularly a problem for street-named based NCAPs such as the test data "Weigh Scale -- Patricia Bay Hwy, Saanich, BC". When searched using the alias hwy 17, it is returned but with a streetName.notMatched fault. Fixing this requires adding a list of aliasNames to every segment (right now they only store their primary names).

Highway aliases for AddressBC address cleanup in address prep scripts

CHILCOTIN-BELLA COOLA 20 HWY => Hwy 20 in Alexis Creek, Anahim Lake, Chilanko Forks, Hanceville, Kleena Kleen, Redstone, Riske Creek, Tatla Lake, Williams Lake, Nimpo Lake

MACKENZIE HWY 20 => HWY 20 in Firvale, Hagensborg, Stuie, Bella Coola

CARIBOO 97 HWY => Hwy 97 in 100 Mile House, 103 Mile House, 108 Mile House, 141 Mile house, 150 Mile House, 70 Mile House, 93 Mile House, Deep Creek IR, Cache Creek, Chasm, Clinton, Lac La Hache, Quesnel, Ashcroft, Maiden Creek, McLeese Lake

Drop streetDirection for Hwy 97 in Alexandria, Deep Creek IR, Lac La Hache, McLeese Lake

Drop streetDirection for Hwy 23 in Galena Bay

PRINCE GEORGE 16 HWY => PRINCE GEORGE HWY 16 in Beaverley, Bednesti Norman,

MCBRIDE 16 HWY => MCBRIDE HWY 16 in Dunster

YELLOWHEAD HWY => Hwy 5 in Avola, Barriere, Birch Island, Blackpool, Black Pines, Blue River, Chinook Cove, Chu Chua, Clearwater, Darfield, Little Fort, Louis Creek

Drop streetDirection for Hwy 5 in Avola, Barriere, Birch Island, Blackpool, Black Pines, Blue River, Chinook Cove, Chu Chua, Clearwater, Darfield, Little Fort, Louis Creek

SEA TO SKY 99 HWY => SEA TO SKY HWY in Mount Currie

SEA TO SKY 99 HWY => HWY 99 in Britannia Beach, Furry Creek, Lillooet, Pavilion, Pemberton, Squamish, Whistler,

Highway 10 (56 Ave)=> 56 Ave in Surrey
Highway 10 (58 Ave)=> 58 Ave in Surrey

HIGHWAY 93 95 => Hwy 93 and 95 in Fairmont Hot Springs, Fort Steele, Windermere, Athalmer, Canal Flats, Skookumchuck, Spillimacheen, Radium Hot Springs, Wasa,

in geocoder/addresses.json, streetName sometimes returned as a number instead of a string

Here's the query:

http://apps.gov.bc.ca/pub/geocoder/addresses.geojson?addressString=19089+FSR+0069,+PINK+MOUNTAIN,+BC

The malformation happens in the streetName attribute, where the value returned is:

"streetName":0069

Ordinarily, streetName is a string, but in this case, perhaps because all the characters are digits, it is handled as a number. Trouble is, it's an illegal number (at least, according to both the JSON parsers I've sent it through. The leading double-zero makes them angry. Probably streetName should just ever and always be a string, since that's how it's interpreted programatically. (You'd never do math on one, for example).

in address range generator, allow street alias matches for addresses with streetType="hwy"

When data suppliers prepare non-civic addresses, the batch geocoder can't tell them if the streetName they are using for an address in a given locality is official or not because there may be more than one official streetName. For example, Douglas St is official, Trans Canada Highway is unofficial south of UpTown, then TransCanada Highway is official north of uptown. This makes it impossible for data suppliers to use the ALE or Batch geocoder to determine the official names of highways on a given block.

To alleviate this problem, allow street alias matches for addresses with streetType="hwy". This way, suppliers can put any valid street name in the streetName field as long as they set streetType="hwy"

XHTML Output Restyle

The current XHTML output is no longer appropriate. It should be changed by:

  • remove sidebar menu
  • add gov header/footer using leo's javascript widget
  • add some css styling to make it a bit more readable

Create a compactSite class to save memory

  1. CompactSite class has the following properties implemented as functions only:

    unitDesignator: returns ""
    unitNumber: returns ""
    unitNumberSuffix: returns ""
    streetQualifier: returns ""
    provinceCode: returns "BC" (or value of fallBackAddress parameter?)
    narrativeLocation: returns ""
    accessNotes: returns ""
    isPrimaryAddress: returns true
    siteStatus: returns "active"
    siteRetirementDate: returns "99991231" (or whatever it currently is set to by default)

  2. Site class is a subclass of CompactSite and has all properties implemented as attributes

  3. Site class also needs an asCompactSite method to make a CompactSite object if possible; returns a "site object doesn't conform to CompactSite" error message otherwise. It may make more sense to have this factory method on CompactSite

Sites are first loaded into Site objects then eligible Sites are converted to CompactSites.

Structured address with an unknown unitDesignator but an otherwise valid civic address returns no match

pramsay wrote:

"The same address, supplied to the geocoder in different ways, leads to different match precisions.

Broken into parts, the geocoder only returns a 'PROVINCE' level match result.

http://apps.gov.bc.ca/pub/geocoder/addresses.xhtml?&unitDesignator=BASEM&streetName=70A&streetType=AVE&civicNumber=14375&localityName=SURREY&streetDirection=&province=BC

But glued together into a string, the geocoder happily consumes it (and produces the very parts used above) and provides a 'CIVIC_NUMBER' level of precision.

http://apps.gov.bc.ca/pub/geocoder/addresses.xhtml?addressString=BASEM%20--%2014375%2070A%20AVE%2C%20SURREY%2C%20BC"

Street level geocodes with ampersand returning match with missing space

Geocoding 7016 L & A Rd Vernon BC works fine. Geocoding L & A Rd Vernon BC returns a street level match for one of the generated aliases: L &A Rd, Vernon, BC (or L& A Rd).

Perhaps the geocoder logic for street comparisons is converting & to 'And' then back but not handling the leading and/or trailing spaces correctly?

Match scores are incorrectly going below zero

A score of -33 is returned from "BOX 939, Garbage, BC"

I've also seen a -5 score for a street precision match with the following faults: [UNRECOGNIZED.notAllowed:33, LOCALITY.notMatched:35, STREET_TYPE.notMatched:3, STREET_QUALIFIER.notMatched:1, STREET_QUALIFIER.spelledWrong:1, CIVIC_NUMBER.notInAnyBlock:10]. This was observed when playing around in a subset of data used for testing. Unfortunately I haven't been able to cook up a similar case against the full data.

When penalty points are so severe that the score is less than one, we probably just want to use our fall-back address instead.

in geocoder/addresses, add support for a streetName.isHighwayAlias fault

Allow a highway street name to be aliased without a penalty. Implement as a streetName.isHighwayAlias fault that can have its own penalty of zero. This allows the non-highway streetName.isAlias fault to still have a positive penalty.

Currently the query address:

5349 HWY 17, Saanich, BC

returns the following:

5349 Patricia Bay Hwy, Saanich, BC

and a fault of [STREET_NAME.isAlias:1]

After this enhancement is implemented, the geocoder will return the same fullAddress but a fault of [STREET_NAME.isHighwayAlias:0]

Geocoder, inconsistent responses to query depending on API use

The same address, supplied to the geocoder in different ways, leads to different match precisions.

Broken into parts, the geocoder only returns a 'PROVINCE' level match result.

http://apps.gov.bc.ca/pub/geocoder/addresses.geojson?streetName=70A&streetType=AVE&unitNumber=BASEM&civicNumber=14375&localityName=SURREY&streetDirection=&provinceCode=BC

But glued together into a string, the geocoder happily consumes it (and produces the very parts used above) and provides a 'CIVIC_NUMBER' level of precision.

http://apps.gov.bc.ca/pub/geocoder/addresses.geojson?addressString=BASEM+--+14375+70A+AVE,+SURREY,+BC

in geocoder admin, add support for export/import configuration data

on Aug 4, 2016, cmhodson wrote:

I propose an "export config data" button on the admin UI which creates a multi-csv file that can be passed into a matching "import config data" button. This would allow Refractions to easily stay up-to-date with any config changes made on the government side. All future config changes would go through Michael and be made on the government side before being transferred back to refractions. When a new release is delivered, the most current configuration would be exported from the gov and the file included in the build, to be used in the case of populating an new/empty cassandra DB.

Presently there is one csv file for each table which are used to populate a new/empty cassandra DB, and we need a way to keep these up to date - this approach solves this problem as well.

In all output formats, output narrativeLocation as accessNotes

The narrativeLocation property is being changed to hold the access notes for a given accessPoint. One day, we will change the internal property name from narrativeLocation to accessNotes but until then, we will just change how it looks to geocoder clients.

Router planner: change startup to operate against individual GeoJSON inputs

There are new street load file conventions created for geocoder v2.1. Modify startup to accommodate the individual inputs now available instead of the old street_load_other.json which is being deprecated. Also it might be prudent to allow the router to work off of street_load_street_segments.json (note the file name may have changed) and have a fall back to street_load_street_segments_post.json

Update Physical Address and Geocoding Standard to reflect experience with Geocoder implementation

  1. Add Coarse to allowed list of locationAccuracy values.
  2. Change meaning of locationAccuracy values as follows:

high - point position was observed or measured using GPS, survey instruments, or photogrammetric methods

medium - point position was interpolated as a point within a parcel, usually a centroid.

low - point position was interpolated along a block face range by a geocoder or digitized off a paper map, web map or an orthophoto

coarse - point position is representative point of a street, locality, or province

coarse - matchPrecision of street, locality, and province
low - matchPrecision of Block and block
medium - blockface interpolated
low -

Add an occupant finder widget that supports name/address autocompletion

  1. The widget expects the user to enter an occupant name unless a front gate delimeter is entered or the matchPrecision parameter is set to something other than occupant.

  2. The widget UI should look like this:

    Name:_________________________

    [Find]

  3. Add a tags parameter to the widget to allow developers to filter results by tags.

The occupant finder widget should be a simple extension of the address finder widget.

Civic addresses with street aliases not standardized to official street in Clinton

1208 Pavilion-Clinton Rd, Clinton, BC also appears as 1208 Kelly Lake Rd, Clinton, BC. Dont know which street name is official but both shouldnt be there. This also happens with the following civic numbers on the same two streets:

1001,1003,1005,1007,1009,1011,1203
1000,1004,1008,1100,1104,1108,1112,1116,1118,1122,1120,1200,1204

Unable to read geometry

Client is having issues creating a Geomark using a shapefile.

Initial review of the shapefile properties do not reveal any errors. Geometry checks are successful and the number of vertices is only 11,000 which is well within the 20,000 limit. File size is also only 194 KB.

We receive the following error message on screen.

"The Application you are looking for is down, please report to the Application Manager."

Within the app logs we then see this message:

2016-08-24 14:49:20,788ERRORca.bc.gov.geomark.web.rest.GeomarkUnable to read geometry
com.revolsys.util.WrappedException: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,0]

Repeating the test today resulted in the following message:

Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'f' (code 102) in prolog; expected '<'
at [row,col {unknown-source}]: [1,1]

Add an excludeUnits flag to sites/within, sites/near, and sites/nearest

if excludeUnits=true, exclude all units from results. For example, given that 955 13th Ave, Valemount, BC is located at (-119.2567793,52.8239806), a sites/within?excludeUnits=true query centred on this point will return 955 13th Ave, Valemount, BC but not the 36 units in the building located at the same address.

Subsites that aren't units should not be excluded since they typically have their own location (e.g., SUB at UVIC)

In the future, excludeUnits=true could exclude all units only if the have the same location as their parent.

in occupant prep script, accept occupants with unmatched units

Currently, an occupant with an unmatched unit will be rejected.For example, if a site exists for 1175 Douglas St,Victoria but not for 310-1175 Douglas St, the latter will be rejected.

Instead of rejecting these occupants, there are two options that would allow us to load it:

  1. Create a subsite of the root site and set unitDesignator, unitNumber, and unitNumberSuffix appropriately.
  2. Create a site with a non-civic address using locality determined from the lat/lon and ITN locality coverage, and the parcelPoint set to the lat/lon.

Option 1 seems more satisfying.

Add a Occupants Nearby widget that supports tag autocompletion

Create a javascript widget that requests an HTML5 Geolocation from the user's browser, asks for a list of tags, with autocompletion on input, then issues a geocoder/occupants/near request.

  1. Find nearest occupant or occupants nearby

    Tags:___________________

    [Find nearest] [Find nearby]

    • uses geolocation tag to get user's lat/lon
    • tags will autocomplete
    • number of results returned by Find nearby controlled by config parameter maxResults

Allow each platform(e.g. delivery, test, production) to have its own logging settings

Enable build-time logging configuration in Maven.
At least two different logging configurations (dev and prod) are required. In order to ensure that the correct logging configuration is enabled for the platform, use a maven profile to select which logging config to copy into place at build time, as per Leo's suggestion:

org.apache.maven.plugins maven-resources-plugin 2.5 log4j process-resources copy-resources output_directory ${log4j.file} dev true path_to_file_A prod path_to_file_B

RangeGen outputs subsites for sites that were dropped

The range generator currently passes all subsites through, we need to drop subsites of sites which are dropped by the range generator for any reason (typically too far from nearest segment with the given name).

in geocoder/addresses, provinceCode parameter being ignored

The example on the dev guide actually displays this problem:

http://apps.gov.bc.ca/pub/geocoder/addresses.geojson?civicNumber=525&streetName=superior&streetType=st&localityName=victoria&provinceCode=BC

The response notes that there is a fault in the query:

{"element":"PROVINCE","fault":"missing","penalty":1}

If you use province instead, the fault goes away. So a problem in the code or in the documentation. Probably the code, since the return JSON slot for the province is provinceCode it would be nice if the query API accepted that slot, as it does for all the other ones.

http://apps.gov.bc.ca/pub/geocoder/addresses.geojson?civicNumber=525&streetName=superior&streetType=st&localityName=victoria&province=BC

in online geocoder, create a compactOccupant class to save memory

  1. CompactOccupant class has the following properties implemented as functions that return nullstring only:

CONTACT_PHONE: returns ""
CONTACT_EMAIL: returns ""
CONTACT_FAX: returns ""
WEBSITE_URL: returns ""
IMAGE_URL: returns ""
CUSTOM_STYLE_NAME returns ""

  1. Occupant class is a subclass of CompactOccupant and has all properties implemented as attributes
  2. Occupant class also needs an asCompactOccupant method to make a CompactOccupant object if possible; returns a "site object doesn't conform to CompactSite" error message otherwise. It may make more sense to have this factory method on CompactOccupant.

Occupants are first loaded into Occupant objects then eligible occupants are converted to CompactOccupants.

Highway aliases for BC Assessment address cleanup in address prep scripts

Cariboo Hwy 97 => Cariboo Hwy in 70 Mile House

means map streetName: Cariboo Hwy 97 to streetName: Cariboo and streetType: Hwy in locality: 70 Mile House

Also, apply streetName mappings before dropping streetDirections


CARIBOO HWY 97 => Hwy 97 in 70 Mile House, 93 Mile House, 100 Mile House, 103 Mile House, 108 Mile House, 141 Mile House, 150 Mile House, Cache Creek, Chasm, Clinton, Lac La Hache, Quesnel, Ashcroft, Maiden Creek

Drop streetDirection for Hwy 97 in Lac La Hache

CARIBOO HWY 97C => Cariboo Hwy in 150 Mile House

AGASSIZ-ROSEDALE HIGHWAY NO 9 => Hwy 9 in Agassiz, Popkum

CHILCOTIN HWY 20 => Hwy 20 in Alexis Creek, Anahim Lake, Chilanko Forks, Hanceville, Kleena Kleen, Redstone, Riske Creek, Tatla Lake, Williams Lake, Nimpo Lake

YELLOWHEAD HWY => Hwy 5 in Avola, Barriere, Birch Island, Blackpool, Black Pines, Blue River, Chinook Cove, Chu Chua, Clearwater, Darfield, Little Fort, Louis Creek

Drop streetDirection for Hwy 5 in Avola, Barriere, Birch Island, Blackpool, Black Pines, Blue River, Chinook Cove, Chu Chua, Clearwater, Darfield, Little Fort, Louis Creek

MACKENZIE HWY 20 => HWY 20 in Firvale, Hagensborg, Stuie, Bella Coola

HIGHWAY 97 => Hwy 97 in Fort St John, Lake Country, Maiden Creek, McLeese Lake, Penticton, Summerland, Sundance Lakes, Arras, Attachie, Groundbirch, Kersley, Kilkerran, Mt Le Moray, Peachland, Progress

Drop streetDirection for Hwy 97 in Alexandria, Arras, Attachie, Australian, Cinema, Groundbirch, Kersley, Kilkerran, Peachland, Progress

HIGHWAY 97 => Alaska Hwy in Fort St John

Drop streetDirection for Hwy 97 in Fort St John

HIGHWAY 97 => John Hart Hwy in Hasler Flats

Drop streetDirection for John Hart Hwy in Hasler Flats

SEA TO SKY HWY => Hwy 99 in Pavilion

HIGHWAY 99 => Hwy 99 in RD Pemberton

HIGHWAY 93 95 => Hwy 93 and 95 in Fairmont Hot Springs, Fort Steele, Windermere, Athalmer, Canal Flats, Skookumchuck, Spillimacheen

HIGHWAY 3 93 => Hwy 3 and 93 in Galloway, Fort Steele, Jaffray

HIGHWAY 3 95 => Hwy 3 and 95 in Cranbrook, Moyie, Radium Hot Springs

HIGHWAY 3 => Hwy 3 in Creston
Drop streetDirection for Hwy 3 in Creston

HIGHWAY 7 => Hwy 97 in Dease Lake

HIGHWAY 16 => McBride Hwy 16 in Dunster

HIGHWAY 16 => Prince George Hwy 16 in Ferndale-Tibor, Perden

HIGHWAY 23 => Hwy 23 in Nakusp

Drop streetDirection for Hwy 23 in Nakusp

MERRITT PRINCETON HWY => MERRITT PRINCETON HWY 5A in Aspen Grove

PRINCETON KAML HWY => HWY 5 in Kamloops (?)

Highway 10 (56 Ave)=> 56 Ave in Surrey
Highway 10 (58 Ave)=> 58 Ave in Surrey

In road network prep script, add any missing HWY N aliases

Every block that is a highway will have its route id property set (e.g., 17,"1+99"). This property can be used to create HWY N aliases if they are missing. For example, for a given block, if route is set to "17", the official streetName is Patricia Bay HWY, and there is no alias streetName of "HWY 17", add such an alias to the block.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.