$result = GetPolyGon("B {Section} update=[Grid1]",$poly) |
$updated = GetPolygon("u","gsak_Delorme_CO") |
$updated = GetPolygon("u","GSAK_Catalonia") |
# Example 1 - Update user data using multiple polygon files stored locally $data = GetPolygon("u","c:\polygons\parks\*.*") # Example 2 - Update user data using a single polygon file stored locally $data = GetPolygon("u","c:\polygons\parks\Central Park.txt") # Example 3 - Update user data with "Lakes" using a macro variable polygon $data = GetPolygon("u update=[Lakes]",$polygon) # Example 4 - Update user data using a special named GSAK group $data = GetPolygon("u","GSAK_BritishGrid") # Example 5 - Just count the number of matched waypoints, no file updating $data = GetPolygon("m","c:\polygons\parks\*.*") msgok msg=Number matched: $data # Example 6 - Force the word "Park" into user data, rather than use the matching file name $data = GetPolygon("u update=[Park]","c:\polygons\parks\*.*") # Example 6 - Check to see if a coordinate is found in the polygon files (notice the "m" option is added to return the count) $data = GetPolygon("m point=[S37° 49.222 E144° 56.779]","c:\polygons\parks\*.*") if $data = "1" msgok msg=Point has a match else msgok msg=Point not matched Endif # Example 7 - Get the matching file name (without extension) of a single point (notice the "m" option is removed) $data = GetPolygon("point=[S37° 49.222 E144° 56.779]","c:\polygons\parks\*.*") if IsEmpty($data) msgok msg=Point not matched else msgok msg=Matched name is: $data endif # Example 8 - Update user data 2 (but only if blank) and also set the user flag if updated $data = GetPolygon("2bf","c:\polygons\parks\*.*") # Example 9 - Just set the user flag for any matched waypoints $data = GetPolygon("r","c:\polygons\parks\*.*") <data> Varname=$polygon 40.587500 -95.783330 40.587500 -95.200000 40.304170 -95.200000 40.304170 -95.783330 40.587500 -95.783330 <enddata> |