|
From: Danny B. <dan...@us...> - 2009-03-18 18:18:36
|
Update of /cvsroot/roadmap/roadmap/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19950 Modified Files: roadmap_line.c roadmap_line.h Log Message: Add new function to look up the fips of a line. Index: roadmap_line.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_line.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** roadmap_line.h 14 Mar 2009 16:10:21 -0000 1.6 --- roadmap_line.h 18 Mar 2009 18:18:24 -0000 1.7 *************** *** 72,74 **** --- 72,76 ---- int roadmap_line_to_point (int line); + int roadmap_line_get_layer (int line_id); + int roadmap_line_get_fips(int line); #endif // INCLUDED__ROADMAP_LINE__H Index: roadmap_line.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_line.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** roadmap_line.c 14 Mar 2009 16:10:21 -0000 1.15 --- roadmap_line.c 18 Mar 2009 18:18:24 -0000 1.16 *************** *** 414,417 **** --- 414,425 ---- } + /** + * @brief + * @param index + * @param line_id + * @param area + * @param cfcc + * @return + */ int roadmap_line_long (int index, int *line_id, RoadMapArea *area, int *cfcc) { *************** *** 544,545 **** --- 552,569 ---- return p[ix]; } + + /** + * @brief return the fips for this line, based on the from point's position + * @param line the line id + * @return the fips + */ + int roadmap_line_get_fips(int line) + { + static int *fl = NULL; + RoadMapPosition pos; + + roadmap_line_from(line, &pos); + if (roadmap_locator_by_position(&pos, &fl) <= 0) + return -1; + return fl[0]; + } |