Skip to main content
Rail Stop Management and Geocoding Functions
Contents
HRESULT _PCRSFN PCRSAddStop(Trip trip, char *stopName, char *rrIn, char *geoChar)
- stopName: place name or geocode
- geoChar: City, SPLC, FSAC, ERPC, or Rule260
- rrIn: railroad SCAC (e.g.
CN
, CPRS
, etc)
HRESULT _PCRSFN PCRSDeleteStop(Trip trip, int which)
- which: stop number to delete (Note: first stop is index 0)
HRESULT _PCRSFN PCRSGetNumStops(Trip trip, int *pNumStops)
- pNumStops: number of stops in route
HRESULT _PCRSFN PCRSClearStops(Trip trip)
HRESULT _PCRSFN PCRSGetStop(Trip trip, int which, char *buffer, int bufSize, int *numchars, char *rr)
- which: index of desired stop (Note: first stop is index 0)
- buffer: character buffer for stop name
- bufSize: max bytes to copy into
buffer
- numchars: actual bytes copied to
buffer
- rr: railroad for given stop
HRESULT _PCRSFN PCRSRRLookup(Trip trip, char *geoName, char *geoChar, int *numMatches)
- geoName: place name or geocode
- geoChar: City, SPLC, FSAC, ERPC, or Rule260
- numMatches: number of railroads found
HRESULT _PCRSFN PCRSGetRRMatch(Trip trip, int which, char *buffer, int bufSize, int *numchars)
- which: index of desired geocode result (Note: first match is index 0)
- buffer: character buffer for geocode result
- bufSize: max bytes to copy into
buffer
- numchars: actual bytes copied to
buffer
HRESULT PCRSJunctionLookup(Trip tripID, char *rrIn, char *rrOut, int *numMatches)
- rrIn, rrOut: railroad SCAC (e.g.
NS
, UP
, etc)
- numMatches: number of junctions matched
HRESULT PCRSGetJunctionMatch(Trip tripID, int which, char *buffer, int bufSize, int *pNumChars)
- which: index of desired geocode result (Note: first match is index 0)
- buffer: character buffer for output geocode
- bufSize: max bytes to copy into
buffer
- numchars: actual bytes copied to
buffer
HRESULT _PCRSFN PCRSGeoLookup(Trip trip, char *geoName, char *geoChar, char *rrIn, int *numMatches)
- geoName: place name or geocode
- geoChar: City, SPLC, FSAC, ERPC, or Rule260
- rrIn: railroad SCAC (e.g.
KCS
, CN
, etc)
- numMatches: number of places found
HRESULT _PCRSFN PCRSGetNumGeoMatches(Trip trip, int *numMatches)
- numMatches: number of places found
HRESULT _PCRSFN PCRSGetGeoMatch(Trip trip, int which, char *buffer, int bufSize, int *numchars)
- which: index of desired geocode result (Note: first match is index 0)
- buffer: character buffer for geocode result
- bufSize: max bytes to copy into
buffer
- numchars: actual bytes copied to
buffer
HRESULT _PCRSFN PCRSRRName2Num(char *rr, short *pRRNum)
- rr: railroad SCAC code (e.g.
KCS
, CN
, etc)
- pRRNum: railroad AAR number
HRESULT _PCRSFN PCRSRRNum2Name(short rrNum, char *rrBuf)
- rrNum: railroad AAR number
- rrBuf: railroad SCAC code (e.g.
KCS
, CN
, etc)
HRESULT _PCRSFN PCRSConvertGeoCode(char *geoName, char *geoCharFrom, char *geoCharTo, char *rr, char *buffer, int bufSize, int *numchars)
- geoName: place name or geocode
- geoCharFrom: City, SPLC, FSAC, ERPC, or Rule260
- geoCharTo: City, SPLC, FSAC, ERPC, or Rule260
- rr: railroad SCAC (e.g.
KCS
, CN
, etc)
- buffer: character buffer for geocode result
- bufSize: max bytes to copy into
buffer
- numchars: actual bytes copied to
buffer
- DataSetID: Base dataset or quarterly update, e.g.
24.0_BASE
, 24.1_UPDATE
, etc.
HRESULT _PCRSFN PCRSIsUpdateAvailable(int DataSetID)
- DataSetID: Base dataset or quarterly update, e.g.
24.0_BASE
, 24.1_UPDATE
, etc.
HRESULT _PCRSFN PCRSGetAvailableUpdates(int *dataSet_1, int *dataSet_2, int *dataSet_3)
- For each dataset,
int*
argument returns 1 if available, 0 if not