GsGetMbr - geostan_1 - 2024.01

GeoStan Geocoding Suite Reference for Windows, Linux, and z/OS

Product type
Software
Portfolio
Locate
Product family
GeoStan Geocoding Suite
Product
GeoStan Geocoding Suite > GeoStan
Version
2024.01
Language
English
Product name
GeoStan
Title
GeoStan Geocoding Suite Reference for Windows, Linux, and z/OS
Copyright
2024
First publish date
1994
Last updated
2024-07-29
Published on
2024-07-29T23:01:18.924000

Returns an MBR for the specified geographic element.

Syntax

GsFunStat GsGetMbr(GsId gs, GsEnum which, void *pData,long *pMinLong, long *pMinLat, long *pMaxLong, long *pMaxLat);

Arguments

gs   ID returned by GsInitWithProps() for the current instance of GeoStan. Input.

which   The following table contains the possible values to which GeoStan assumes pData is pointing.

GS_MBR_SEGMENT

GsSegmentHandle.

GS_MBR_STREET

GsStreetHandle.

GS_MBR_CITY

pstr, containing digits in the format SSFFFFCCC where S is state, F is finance, and C is city.

GS_MBR_FINANCE

pstr, containing digits in the format SSFFFF where S is state, and F is finance

*pData   Points at value passed for which. Input.

*pMinLong   Minimum longitude. One of four values that make up the MBR. Output.

*pMinLat   Minimum latitude. One of four values that make up the MBR. Output.

*pMaxLong   Maximum longitude. One of four values that make up the MBR. Output.

*pMaxLat   Maximum latitude. One of four values that make up the MBR. Output.

Return Values

GS_ERROR    For GS_MBR_SEGMENT and GS_MBR_STREET, if the specified geographical element has no spatial data, then all outputs have a value of zero. For GS_MBR_CITY and GS_MBR_FINANCE, if GeoStan cannot find the specified geographical element all outputs have a value of 0 (zero).

GS_SUCCESS   The four longs hold the requested MBR.

Prerequisites

GsFindFirstStreet() and GsCityDataGet()

Notes

GeoStan handles all geocodes in these functions in ten-thousandths of degrees—not millionths like GsDataGet().

To make a call with GS_MBR_CITY, you must first make a call to GsPrepareIndexFinance(). To retrieve an MBR for GS_MBR_CITY, you must have already  installed from the data media, or built the uscity.gsx file using the batchind.exe utility program. Use GsDataGet() with GS_QCITY to get a city number or a finance number (finance number is the first 6 digits of the city number).

MBR Representation by Lat/Lon

See GsFindFirstSegmentByMbr for an MBR representation by latitude and longitude.