MCPcopy Index your code
hub / github.com/MapServer/MapServer / msWCSParseSubsetKVPString20

Function msWCSParseSubsetKVPString20

mapwcs20.c:489–534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487/************************************************************************/
488
489static int msWCSParseSubsetKVPString20(wcs20SubsetObjPtr subset, char *string)
490{
491 char *axis, *crs, *min, *max;
492
493 axis = string;
494 crs = NULL;
495 min = NULL;
496 max = NULL;
497
498 /* find first '(' */
499 min = strchr(string, '(');
500
501 /* if min could not be found, the string is invalid */
502 if (min == NULL)
503 {
504 msSetError(MS_WCSERR, "Invalid axis subset string: '%s'",
505 "msWCSParseSubsetKVPString20()", string);
506 return MS_FAILURE;
507 }
508 /* set min to first letter */
509 *min = '\0';
510 ++min;
511
512 /* cut the trailing ')' */
513 if (min[strlen(min) - 1] == ')')
514 {
515 min[strlen(min) - 1] = '\0';
516 }
517 /* look if also a max is defined */
518 max = strchr(min, ',');
519 if (max != NULL)
520 {
521 *max = '\0';
522 ++max;
523 }
524
525 /* look if also a crs is defined */
526 crs = strchr(axis, ',');
527 if (crs != NULL)
528 {
529 *crs = '\0';
530 ++crs;
531 }
532
533 return msWCSParseSubset20(subset, axis, crs, min, max);
534}
535
536/************************************************************************/
537/* msWCSParseSizeString20() */

Callers 1

msWCSParseRequest20Function · 0.85

Calls 2

msSetErrorFunction · 0.85
msWCSParseSubset20Function · 0.85

Tested by

no test coverage detected