pipObjectFindFirstContaining - spatial_geostan - 2024.00

Spatial+ Reference for Windows, UNIX/Linux, z/OS

Product type
Software
Portfolio
Locate
Product family
GeoStan Geocoding Suite
Product
GeoStan Geocoding Suite > Spatial+
Version
2024.00
Language
English
Product name
Spatial+
Title
Spatial+ Reference for Windows, UNIX/Linux, z/OS
Copyright
2024
First publish date
1994
Last updated
2024-05-07
Published on
2024-05-07T22:16:04.316305

Finds first object containing the input point.

Syntax

intl pipObjectFindFirstContaining ( pipObjectFile obj_h, intl lon, intl lat, intl radius, pstr nameBuffer, intl bufSize );

Arguments

obj_h The handle of the opened object file. Input.

lon The longitude (in millionths of degrees) or x coordinate defining the input point. Input.

lat The latitude (in millionths of degrees) or y coordinate defining the input point. Input.

radius The buffer radius or width (in feet) to apply to the features in the object file. To use this parameter, the object file must either contain only point features, or be built with buffering enabled.

Input.

nameBuffer A pointer to a buffer to be filled with the identifier of the object in which the point is located. Output.

bufSize The size of the buffer that contains the identifier of the object in which the point is located. If the buffer size is smaller than the identifier, the identifier is truncated. Input.

Return Value

PIP_ERROR PIP_NOT_FOUND PIP_IN_POLYGON PIP_IN_BUFFER PIP_IN_BORDER

Prerequisites

pipObjectFileOpen.

Alternates

None.

Notes

This function gets the primary name of the object that contains the point given. Use

pipObjectFindNext to retrieve the next object.

If no object containing input is found, the function returns PIP_NOT_FOUND.

The following figure illustrates the four possible positions of a point with respect to a single polygon.

Example

// Find all polygons (do not use buffers) that contain a

// point. We assume everything works and perform no error

// checking!

pipObjectFile obj_h; char Name[MAX_NAME]; intl status;

pipObjectFileOpen( h, "C:\PIP\TEST.GSB", PIP_OPEN_LARGE_CACHE, &obj_h );

status = pipObjectFindFirstContaining( obj_h, 120123456, 38000000, 0, Name, MAX_NAME );

while ( status != PIP_ERROR && status != PIP_NOT_FOUND )

{

printf( "Found in feature %s\n", Name );

status = pipObjectFindNext( obj_h, Name, MAX_NAME );

}

pipObjectFileClose( polyh );