Changeset 8461 for issm/trunk/src/c/objects/KML/KML_LinearRing.cpp
- Timestamp:
- 06/01/11 09:13:35 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/KML/KML_LinearRing.cpp
r8293 r8461 97 97 int i; 98 98 99 if (this->id && strlen(this->id)) 100 fprintf(filout,"%s<LinearRing id=\"%s\">\n",indent,this->id); 101 else 102 fprintf(filout,"%s<LinearRing>\n",indent); 99 fprintf(filout,"%s<LinearRing",indent); 100 WriteAttrib(filout," "); 101 fprintf(filout,">\n"); 103 102 104 103 KML_Geometry::Write(filout,indent); … … 125 124 void KML_LinearRing::Read(FILE* fid,char* kstr){ 126 125 126 char* kstri; 127 128 /* get object attributes */ 129 130 KMLFileTagAttrib(this, 131 kstr); 132 133 /* loop over and process fields within opening and closing tags */ 134 135 while (kstri=KMLFileToken(fid)) { 136 if (!strncmp(kstri,"</LinearRing",12)) { 137 xfree((void**)&kstri); 138 break; 139 } 140 else if (!strncmp(kstri,"</",2)) 141 _error_("KML_LinearRing::Read -- Unexpected closing tag %s.\n",kstri); 142 else if (strncmp(kstri,"<",1)) 143 _error_("KML_LinearRing::Read -- Unexpected field \"%s\".\n",kstri); 144 145 else if (!strcmp(kstri,"<extrude>")) 146 KMLFileTokenParse(&extrude , 147 kstri, 148 fid); 149 else if (!strcmp(kstri,"<tessellate>")) 150 KMLFileTokenParse(&tessellate, 151 kstri, 152 fid); 153 else if (!strcmp(kstri,"<altitudeMode>")) 154 KMLFileTokenParse( altmode ,NULL,KML_LINEARRING_ALTMODE_LENGTH, 155 kstri, 156 fid); 157 else if (!strcmp(kstri,"<coordinates>")) 158 KMLFileTokenParse(&coords ,&ncoord ,0, 159 kstri, 160 fid); 161 162 else if (!strncmp(kstri,"<",1)) 163 KML_Geometry::Read(fid,kstri); 164 165 xfree((void**)&kstri); 166 } 127 167 128 168 return;
Note:
See TracChangeset
for help on using the changeset viewer.