| 918 | } |
| 919 | |
| 920 | static void writeFeature(FILE *stream, int indent, shapeObj *feature) |
| 921 | { |
| 922 | int i,j; |
| 923 | |
| 924 | indent++; |
| 925 | writeBlockBegin(stream, indent, "FEATURE"); |
| 926 | |
| 927 | indent++; |
| 928 | for(i=0; i<feature->numlines; i++) { |
| 929 | writeBlockBegin(stream, indent, "POINTS"); |
| 930 | for(j=0; j<feature->line[i].numpoints; j++) { |
| 931 | writeIndent(stream, indent); |
| 932 | fprintf(stream, "%.15g %.15g\n", feature->line[i].point[j].x, feature->line[i].point[j].y); |
| 933 | } |
| 934 | writeBlockEnd(stream, indent, "POINTS"); |
| 935 | } |
| 936 | indent--; |
| 937 | |
| 938 | if (feature->numvalues) { |
| 939 | writeIndent(stream, indent); |
| 940 | fprintf(stream, "ITEMS \""); |
| 941 | for (i=0; i<feature->numvalues; i++) { |
| 942 | if (i == 0) |
| 943 | fprintf(stream, "%s", feature->values[i]); |
| 944 | else |
| 945 | fprintf(stream, ";%s", feature->values[i]); |
| 946 | } |
| 947 | fprintf(stream, "\"\n"); |
| 948 | } |
| 949 | |
| 950 | writeString(stream, indent, "TEXT", NULL, feature->text); |
| 951 | writeBlockEnd(stream, indent, "FEATURE"); |
| 952 | } |
| 953 | |
| 954 | void initGrid( graticuleObj *pGraticule ) |
| 955 | { |
no test coverage detected