提交 9656e4ba4b0ede6e399695963419c168f8f3fac6

作者 qingxiongf
1 个父辈 93c4271e

ZM数据解析

@@ -191,8 +191,9 @@ namespace DmapCore_30 @@ -191,8 +191,9 @@ namespace DmapCore_30
191 { 191 {
192 unsigned char *here = (unsigned char *)PQgetvalue(res, i, 0); 192 unsigned char *here = (unsigned char *)PQgetvalue(res, i, 0);
193 unsigned char hasZorSrsid = ((unsigned char *)(here + 4))[0] / 16; 193 unsigned char hasZorSrsid = ((unsigned char *)(here + 4))[0] / 16;
194 - unsigned char hasZ = hasZorSrsid / 8;  
195 - unsigned char hasSrsid = hasZorSrsid % 8; 194 + unsigned char hasM = hasZorSrsid & 1<<2;
  195 + unsigned char hasZ = hasZorSrsid & 1<<3;
  196 + unsigned char hasSrsid = hasZorSrsid & 1<<1;
196 197
197 int not_big = here[0]; 198 int not_big = here[0];
198 here++; 199 here++;
@@ -275,8 +276,9 @@ namespace DmapCore_30 @@ -275,8 +276,9 @@ namespace DmapCore_30
275 { 276 {
276 unsigned char *here = (unsigned char *)PQgetvalue(res, i, 0); 277 unsigned char *here = (unsigned char *)PQgetvalue(res, i, 0);
277 unsigned char hasZorSrsid = ((unsigned char *)(here + 4))[0] / 16; 278 unsigned char hasZorSrsid = ((unsigned char *)(here + 4))[0] / 16;
278 - unsigned char hasZ = hasZorSrsid / 8;  
279 - unsigned char hasSrsid = hasZorSrsid % 8; 279 + unsigned char hasM = hasZorSrsid & 1<<2;
  280 + unsigned char hasZ = hasZorSrsid & 1<<3;
  281 + unsigned char hasSrsid = hasZorSrsid & 1<<1;
280 282
281 int not_big = here[0]; 283 int not_big = here[0];
282 here++; 284 here++;
@@ -368,8 +370,10 @@ namespace DmapCore_30 @@ -368,8 +370,10 @@ namespace DmapCore_30
368 unsigned char *here = (unsigned char *)PQgetvalue(res, i, 0); 370 unsigned char *here = (unsigned char *)PQgetvalue(res, i, 0);
369 unsigned char geom_type = (here)[1]; 371 unsigned char geom_type = (here)[1];
370 unsigned char hasZorSrsid = ((unsigned char *)(here + 4))[0] / 16; 372 unsigned char hasZorSrsid = ((unsigned char *)(here + 4))[0] / 16;
371 - unsigned char hasZ = hasZorSrsid / 8;  
372 - unsigned char hasSrsid = hasZorSrsid % 8; 373 + unsigned char hasM = hasZorSrsid & 1<<2;
  374 + unsigned char hasZ = hasZorSrsid & 1<<3;
  375 + unsigned char hasSrsid = hasZorSrsid & 1<<1;
  376 +
373 int not_big = clsUtil::ReadByte(here); 377 int not_big = clsUtil::ReadByte(here);
374 int shapetype = clsUtil::ReadInt(here, not_big); 378 int shapetype = clsUtil::ReadInt(here, not_big);
375 if (hasSrsid) 379 if (hasSrsid)
@@ -404,11 +408,8 @@ namespace DmapCore_30 @@ -404,11 +408,8 @@ namespace DmapCore_30
404 408
405 double x = clsUtil::ReadDouble(here, not_big); 409 double x = clsUtil::ReadDouble(here, not_big);
406 double y = clsUtil::ReadDouble(here, not_big); 410 double y = clsUtil::ReadDouble(here, not_big);
407 - if (hasZ)  
408 - {  
409 - //Z 值跳过  
410 - here += 8;  
411 - } 411 + if (hasZ)here += 8;
  412 + if (hasM) here += 8;
412 double x0 = 0, y0 = 0; 413 double x0 = 0, y0 = 0;
413 this->ToScale(x, y, x0, y0); 414 this->ToScale(x, y, x0, y0);
414 415
@@ -446,11 +447,8 @@ namespace DmapCore_30 @@ -446,11 +447,8 @@ namespace DmapCore_30
446 447
447 double x = clsUtil::ReadDouble(here, not_big2); 448 double x = clsUtil::ReadDouble(here, not_big2);
448 double y = clsUtil::ReadDouble(here, not_big2); 449 double y = clsUtil::ReadDouble(here, not_big2);
449 - if (hasZ)  
450 - {  
451 - //Z 值跳过  
452 - here += 8;  
453 - } 450 + if (hasZ) here += 8;
  451 + if (hasM) here += 8;
454 double x0 = 0, y0 = 0; 452 double x0 = 0, y0 = 0;
455 this->ToScale(x, y, x0, y0); 453 this->ToScale(x, y, x0, y0);
456 454
@@ -492,8 +490,10 @@ namespace DmapCore_30 @@ -492,8 +490,10 @@ namespace DmapCore_30
492 490
493 unsigned char *here = (unsigned char *)PQgetvalue(res, i, 0); 491 unsigned char *here = (unsigned char *)PQgetvalue(res, i, 0);
494 unsigned char hasZorSrsid = ((unsigned char *)(here + 4))[0] / 16; 492 unsigned char hasZorSrsid = ((unsigned char *)(here + 4))[0] / 16;
495 - unsigned char hasZ = hasZorSrsid / 8;  
496 - unsigned char hasSrsid = hasZorSrsid % 8; 493 + unsigned char hasM = hasZorSrsid & 1<<2;
  494 + unsigned char hasZ = hasZorSrsid & 1<<3;
  495 + unsigned char hasSrsid = hasZorSrsid & 1<<1;
  496 +
497 int not_big = clsUtil::ReadByte(here); 497 int not_big = clsUtil::ReadByte(here);
498 int shapetype = clsUtil::ReadInt(here, not_big); 498 int shapetype = clsUtil::ReadInt(here, not_big);
499 if (hasSrsid) 499 if (hasSrsid)
@@ -527,11 +527,8 @@ namespace DmapCore_30 @@ -527,11 +527,8 @@ namespace DmapCore_30
527 527
528 double x = clsUtil::ReadDouble(here, not_big2); 528 double x = clsUtil::ReadDouble(here, not_big2);
529 double y = clsUtil::ReadDouble(here, not_big2); 529 double y = clsUtil::ReadDouble(here, not_big2);
530 - if (hasZ)  
531 - {  
532 - //Z 值跳过  
533 - here += 8;  
534 - } 530 + if (hasZ) here += 8;
  531 + if (hasM) here += 8;
535 double x0 = 0, y0 = 0; 532 double x0 = 0, y0 = 0;
536 this->ToScale(x, y, x0, y0); 533 this->ToScale(x, y, x0, y0);
537 534
@@ -639,8 +636,9 @@ namespace DmapCore_30 @@ -639,8 +636,9 @@ namespace DmapCore_30
639 636
640 unsigned char geom_type = (here)[1]; 637 unsigned char geom_type = (here)[1];
641 unsigned char hasZorSrsid = ((unsigned char *)(here + 4))[0] / 16; 638 unsigned char hasZorSrsid = ((unsigned char *)(here + 4))[0] / 16;
642 - unsigned char hasZ = hasZorSrsid / 8;  
643 - unsigned char hasSrsid = hasZorSrsid % 8; 639 + unsigned char hasM = hasZorSrsid & 1<<2;
  640 + unsigned char hasZ = hasZorSrsid & 1<<3;
  641 + unsigned char hasSrsid = hasZorSrsid & 1<<1;
644 // printf("%d %d \r\n",i,geom_type ); 642 // printf("%d %d \r\n",i,geom_type );
645 not_big1 = clsUtil::ReadByte(here); 643 not_big1 = clsUtil::ReadByte(here);
646 shapetype1 = clsUtil::ReadInt(here, not_big1); 644 shapetype1 = clsUtil::ReadInt(here, not_big1);
@@ -720,11 +718,8 @@ namespace DmapCore_30 @@ -720,11 +718,8 @@ namespace DmapCore_30
720 { 718 {
721 double x = clsUtil::ReadDouble(here, not_big1); 719 double x = clsUtil::ReadDouble(here, not_big1);
722 double y = clsUtil::ReadDouble(here, not_big1); 720 double y = clsUtil::ReadDouble(here, not_big1);
723 - if (hasZ)  
724 - {  
725 - //Z 值跳过  
726 - here += 8;  
727 - } 721 + if (hasZ) here += 8;
  722 + if (hasM) here += 8;
728 double x0 = 0, y0 = 0; 723 double x0 = 0, y0 = 0;
729 this->ToScale(x, y, x0, y0); 724 this->ToScale(x, y, x0, y0);
730 725
@@ -817,11 +812,8 @@ namespace DmapCore_30 @@ -817,11 +812,8 @@ namespace DmapCore_30
817 { 812 {
818 double x = clsUtil::ReadDouble(here, not_big2); 813 double x = clsUtil::ReadDouble(here, not_big2);
819 double y = clsUtil::ReadDouble(here, not_big2); 814 double y = clsUtil::ReadDouble(here, not_big2);
820 - if (hasZ)  
821 - {  
822 - //Z 值跳过  
823 - here += 8;  
824 - } 815 + if (hasZ) here += 8;
  816 + if (hasM) here += 8;
825 double x0 = 0, y0 = 0; 817 double x0 = 0, y0 = 0;
826 this->ToScale(x, y, x0, y0); 818 this->ToScale(x, y, x0, y0);
827 819
@@ -879,8 +871,9 @@ namespace DmapCore_30 @@ -879,8 +871,9 @@ namespace DmapCore_30
879 871
880 unsigned char geom_type = (here)[1]; 872 unsigned char geom_type = (here)[1];
881 unsigned char hasZorSrsid = ((unsigned char *)(here + 4))[0] / 16; 873 unsigned char hasZorSrsid = ((unsigned char *)(here + 4))[0] / 16;
882 - unsigned char hasZ = hasZorSrsid / 8;  
883 - unsigned char hasSrsid = hasZorSrsid % 8; 874 + unsigned char hasM = hasZorSrsid & 1<<2;
  875 + unsigned char hasZ = hasZorSrsid & 1<<3;
  876 + unsigned char hasSrsid = hasZorSrsid & 1<<1;
884 877
885 not_big1 = clsUtil::ReadByte(here); 878 not_big1 = clsUtil::ReadByte(here);
886 shapetype1 = clsUtil::ReadInt(here, not_big1); 879 shapetype1 = clsUtil::ReadInt(here, not_big1);
@@ -1008,11 +1001,8 @@ namespace DmapCore_30 @@ -1008,11 +1001,8 @@ namespace DmapCore_30
1008 { 1001 {
1009 double x = clsUtil::ReadDouble(here, not_big2); 1002 double x = clsUtil::ReadDouble(here, not_big2);
1010 double y = clsUtil::ReadDouble(here, not_big2); 1003 double y = clsUtil::ReadDouble(here, not_big2);
1011 - if (hasZ)  
1012 - {  
1013 - //Z 值跳过  
1014 - here += 8;  
1015 - } 1004 + if (hasZ) here += 8;
  1005 + if (hasM) here += 8;
1016 double x0 = 0, y0 = 0; 1006 double x0 = 0, y0 = 0;
1017 this->ToScale(x, y, x0, y0); 1007 this->ToScale(x, y, x0, y0);
1018 1008
@@ -1066,8 +1056,9 @@ namespace DmapCore_30 @@ -1066,8 +1056,9 @@ namespace DmapCore_30
1066 unsigned char *here = (unsigned char *)PQgetvalue(res, i, 0); 1056 unsigned char *here = (unsigned char *)PQgetvalue(res, i, 0);
1067 unsigned char geom_type = (here)[1]; 1057 unsigned char geom_type = (here)[1];
1068 unsigned char hasZorSrsid = ((unsigned char *)(here + 4))[0] / 16; 1058 unsigned char hasZorSrsid = ((unsigned char *)(here + 4))[0] / 16;
1069 - unsigned char hasZ = hasZorSrsid / 8;  
1070 - unsigned char hasSrsid = hasZorSrsid % 8; 1059 + unsigned char hasM = hasZorSrsid & 1<<2;
  1060 + unsigned char hasZ = hasZorSrsid & 1<<3;
  1061 + unsigned char hasSrsid = hasZorSrsid & 1<<1;
1071 not_big1 = clsUtil::ReadByte(here); 1062 not_big1 = clsUtil::ReadByte(here);
1072 shapetype1 = clsUtil::ReadInt(here, not_big1); 1063 shapetype1 = clsUtil::ReadInt(here, not_big1);
1073 if (hasSrsid) 1064 if (hasSrsid)
@@ -1194,11 +1185,8 @@ namespace DmapCore_30 @@ -1194,11 +1185,8 @@ namespace DmapCore_30
1194 { 1185 {
1195 double x = clsUtil::ReadDouble(here, not_big2); 1186 double x = clsUtil::ReadDouble(here, not_big2);
1196 double y = clsUtil::ReadDouble(here, not_big2); 1187 double y = clsUtil::ReadDouble(here, not_big2);
1197 - if (hasZ)  
1198 - {  
1199 - //Z 值跳过  
1200 - here += 8;  
1201 - } 1188 + if (hasZ) here += 8;
  1189 + if (hasM) here += 8;
1202 double x0 = 0, y0 = 0; 1190 double x0 = 0, y0 = 0;
1203 this->ToScale(x, y, x0, y0); 1191 this->ToScale(x, y, x0, y0);
1204 1192
@@ -1630,8 +1618,9 @@ namespace DmapCore_30 @@ -1630,8 +1618,9 @@ namespace DmapCore_30
1630 shared_ptr<PointClass> DataCollection::GetDataPoint(unsigned char *vc) 1618 shared_ptr<PointClass> DataCollection::GetDataPoint(unsigned char *vc)
1631 { 1619 {
1632 unsigned char hasZorSrsid = ((unsigned char *)(vc + 4))[0] / 16; 1620 unsigned char hasZorSrsid = ((unsigned char *)(vc + 4))[0] / 16;
1633 - unsigned char hasZ = hasZorSrsid / 8;  
1634 - unsigned char hasSrsid = hasZorSrsid % 8; 1621 + unsigned char hasM = hasZorSrsid & 1<<2;
  1622 + unsigned char hasZ = hasZorSrsid & 1<<3;
  1623 + unsigned char hasSrsid = hasZorSrsid & 1<<1;
1635 1624
1636 int not_big = clsUtil::ReadByte(vc); 1625 int not_big = clsUtil::ReadByte(vc);
1637 int shapetype = clsUtil::ReadInt(vc, not_big); 1626 int shapetype = clsUtil::ReadInt(vc, not_big);
@@ -1650,8 +1639,9 @@ namespace DmapCore_30 @@ -1650,8 +1639,9 @@ namespace DmapCore_30
1650 shared_ptr<PointClass> DataCollection::GetMDataPoint(unsigned char *vc) 1639 shared_ptr<PointClass> DataCollection::GetMDataPoint(unsigned char *vc)
1651 { 1640 {
1652 unsigned char hasZorSrsid = ((unsigned char *)(vc + 4))[0] / 16; 1641 unsigned char hasZorSrsid = ((unsigned char *)(vc + 4))[0] / 16;
1653 - unsigned char hasZ = hasZorSrsid / 8;  
1654 - unsigned char hasSrsid = hasZorSrsid % 8; 1642 + unsigned char hasM = hasZorSrsid & 1<<2;
  1643 + unsigned char hasZ = hasZorSrsid & 1<<3;
  1644 + unsigned char hasSrsid = hasZorSrsid & 1<<1;
1655 1645
1656 int not_big = clsUtil::ReadByte(vc); 1646 int not_big = clsUtil::ReadByte(vc);
1657 int shapetype = clsUtil::ReadInt(vc, not_big); 1647 int shapetype = clsUtil::ReadInt(vc, not_big);
@@ -1686,8 +1676,9 @@ namespace DmapCore_30 @@ -1686,8 +1676,9 @@ namespace DmapCore_30
1686 shared_ptr<PolygonClass> DataCollection::GetDataLine(unsigned char *vc) 1676 shared_ptr<PolygonClass> DataCollection::GetDataLine(unsigned char *vc)
1687 { 1677 {
1688 unsigned char hasZorSrsid = ((unsigned char *)(vc + 4))[0] / 16; 1678 unsigned char hasZorSrsid = ((unsigned char *)(vc + 4))[0] / 16;
1689 - unsigned char hasZ = hasZorSrsid / 8;  
1690 - unsigned char hasSrsid = hasZorSrsid % 8; 1679 + unsigned char hasM = hasZorSrsid & 1<<2;
  1680 + unsigned char hasZ = hasZorSrsid & 1<<3;
  1681 + unsigned char hasSrsid = hasZorSrsid & 1<<1;
1691 1682
1692 int not_big = clsUtil::ReadByte(vc); 1683 int not_big = clsUtil::ReadByte(vc);
1693 int shapetype = clsUtil::ReadInt(vc, not_big); 1684 int shapetype = clsUtil::ReadInt(vc, not_big);
@@ -1722,8 +1713,9 @@ namespace DmapCore_30 @@ -1722,8 +1713,9 @@ namespace DmapCore_30
1722 double y = clsUtil::ReadDouble(vc, not_big); 1713 double y = clsUtil::ReadDouble(vc, not_big);
1723 p_polygon->vec_X.push_back(x); 1714 p_polygon->vec_X.push_back(x);
1724 p_polygon->vec_Y.push_back(y); 1715 p_polygon->vec_Y.push_back(y);
1725 - if (hasZ)  
1726 - vc += 8; 1716 + if (hasZ) vc += 8;
  1717 + if (hasM) vc += 8;
  1718 +
1727 if (pol_minx > x) 1719 if (pol_minx > x)
1728 pol_minx = x; 1720 pol_minx = x;
1729 if (pol_miny > y) 1721 if (pol_miny > y)
@@ -1744,8 +1736,9 @@ namespace DmapCore_30 @@ -1744,8 +1736,9 @@ namespace DmapCore_30
1744 shared_ptr<PolygonClass> DataCollection::GetDataMLine(unsigned char *vc) 1736 shared_ptr<PolygonClass> DataCollection::GetDataMLine(unsigned char *vc)
1745 { 1737 {
1746 unsigned char hasZorSrsid = ((unsigned char *)(vc + 4))[0] / 16; 1738 unsigned char hasZorSrsid = ((unsigned char *)(vc + 4))[0] / 16;
1747 - unsigned char hasZ = hasZorSrsid / 8;  
1748 - unsigned char hasSrsid = hasZorSrsid % 8; 1739 + unsigned char hasM = hasZorSrsid & 1<<2;
  1740 + unsigned char hasZ = hasZorSrsid & 1<<3;
  1741 + unsigned char hasSrsid = hasZorSrsid & 1<<1;
1749 1742
1750 int not_big = clsUtil::ReadByte(vc); 1743 int not_big = clsUtil::ReadByte(vc);
1751 int shapetype = clsUtil::ReadInt(vc, not_big); 1744 int shapetype = clsUtil::ReadInt(vc, not_big);
@@ -1782,8 +1775,8 @@ namespace DmapCore_30 @@ -1782,8 +1775,8 @@ namespace DmapCore_30
1782 double y = clsUtil::ReadDouble(vc, not_big2); 1775 double y = clsUtil::ReadDouble(vc, not_big2);
1783 p_polygon->vec_X.push_back(x); 1776 p_polygon->vec_X.push_back(x);
1784 p_polygon->vec_Y.push_back(y); 1777 p_polygon->vec_Y.push_back(y);
1785 - if (hasZ)  
1786 - vc += 8; 1778 + if (hasZ) vc += 8;
  1779 + if (hasM) vc += 8;
1787 if (pol_minx > x) 1780 if (pol_minx > x)
1788 pol_minx = x; 1781 pol_minx = x;
1789 if (pol_miny > y) 1782 if (pol_miny > y)
@@ -1807,8 +1800,9 @@ namespace DmapCore_30 @@ -1807,8 +1800,9 @@ namespace DmapCore_30
1807 try 1800 try
1808 { 1801 {
1809 unsigned char hasZorSrsid = ((unsigned char *)(here + 4))[0] / 16; 1802 unsigned char hasZorSrsid = ((unsigned char *)(here + 4))[0] / 16;
1810 - unsigned char hasZ = hasZorSrsid / 8;  
1811 - unsigned char hasSrsid = hasZorSrsid % 8; 1803 + unsigned char hasM = hasZorSrsid & 1<<2;
  1804 + unsigned char hasZ = hasZorSrsid & 1<<3;
  1805 + unsigned char hasSrsid = hasZorSrsid & 1<<1;
1812 //bool hasZ = false; 1806 //bool hasZ = false;
1813 int not_big1, not_big2, shapetype1, nring, npoint; 1807 int not_big1, not_big2, shapetype1, nring, npoint;
1814 not_big1 = clsUtil::ReadByte(here); 1808 not_big1 = clsUtil::ReadByte(here);
@@ -1842,8 +1836,8 @@ namespace DmapCore_30 @@ -1842,8 +1836,8 @@ namespace DmapCore_30
1842 { 1836 {
1843 double x = clsUtil::ReadDouble(here, not_big1); 1837 double x = clsUtil::ReadDouble(here, not_big1);
1844 double y = clsUtil::ReadDouble(here, not_big1); 1838 double y = clsUtil::ReadDouble(here, not_big1);
1845 - if (hasZ)  
1846 - here += 8; 1839 + if (hasZ) here += 8;
  1840 + if (hasM) here += 8;
1847 p_polygon->vec_X.push_back(x); 1841 p_polygon->vec_X.push_back(x);
1848 p_polygon->vec_Y.push_back(y); 1842 p_polygon->vec_Y.push_back(y);
1849 1843
@@ -1886,8 +1880,9 @@ namespace DmapCore_30 @@ -1886,8 +1880,9 @@ namespace DmapCore_30
1886 try 1880 try
1887 { 1881 {
1888 unsigned char hasZorSrsid = ((unsigned char *)(here + 4))[0] / 16; 1882 unsigned char hasZorSrsid = ((unsigned char *)(here + 4))[0] / 16;
1889 - unsigned char hasZ = hasZorSrsid / 8;  
1890 - unsigned char hasSrsid = hasZorSrsid % 8; 1883 + unsigned char hasM = hasZorSrsid & 1<<2;
  1884 + unsigned char hasZ = hasZorSrsid & 1<<3;
  1885 + unsigned char hasSrsid = hasZorSrsid & 1<<1;
1891 1886
1892 unsigned char geom_type = (here)[1]; 1887 unsigned char geom_type = (here)[1];
1893 1888
@@ -1947,8 +1942,8 @@ namespace DmapCore_30 @@ -1947,8 +1942,8 @@ namespace DmapCore_30
1947 { 1942 {
1948 double x = clsUtil::ReadDouble(here, not_big2); 1943 double x = clsUtil::ReadDouble(here, not_big2);
1949 double y = clsUtil::ReadDouble(here, not_big2); 1944 double y = clsUtil::ReadDouble(here, not_big2);
1950 - if (hasZ)  
1951 - here += 8; 1945 + if (hasZ) here += 8;
  1946 + if (hasM) here += 8;
1952 p_polygon->vec_X.push_back(x); 1947 p_polygon->vec_X.push_back(x);
1953 p_polygon->vec_Y.push_back(y); 1948 p_polygon->vec_Y.push_back(y);
1954 1949
@@ -19,9 +19,10 @@ namespace mapserver @@ -19,9 +19,10 @@ namespace mapserver
19 unsigned char hasZorSrsid = ((unsigned char *)(pwkb + 4))[0] / 16; 19 unsigned char hasZorSrsid = ((unsigned char *)(pwkb + 4))[0] / 16;
20 20
21 unsigned char type = ((unsigned char *)(pwkb + 1))[0]; 21 unsigned char type = ((unsigned char *)(pwkb + 1))[0];
22 - this->hasZ_ = hasZorSrsid / 8;  
23 - this->hasSrid_ = hasZorSrsid % 8;  
24 - 22 +
  23 + this->hasSrid_ = hasZorSrsid & 1<<1;
  24 + this->hasM_ = hasZorSrsid & 1<<2;
  25 + this->hasZ_ =hasZorSrsid & 1<<3;
25 26
26 notbig_ = this->ReadByte(pwkb); 27 notbig_ = this->ReadByte(pwkb);
27 int shape = this->ReadInt(pwkb, notbig_); 28 int shape = this->ReadInt(pwkb, notbig_);
@@ -40,7 +41,11 @@ namespace mapserver @@ -40,7 +41,11 @@ namespace mapserver
40 // case DmpWkbTypes::Type::PointZM: 41 // case DmpWkbTypes::Type::PointZM:
41 { 42 {
42 sstream << R"({"type":"Point","coordinates": [)"; 43 sstream << R"({"type":"Point","coordinates": [)";
43 - readPointfromWKB(pwkb,sstream); 44 + double xx = this->ReadDouble(pwkb,notbig_);
  45 + double yy = this->ReadDouble(pwkb,notbig_);
  46 +
  47 + sstream << ToDoubleStr(xx) << "," << ToDoubleStr(yy) ;
  48 +
44 break; 49 break;
45 } 50 }
46 51
@@ -136,6 +141,11 @@ namespace mapserver @@ -136,6 +141,11 @@ namespace mapserver
136 pwkb += 8; 141 pwkb += 8;
137 // double zz = this->ReadDouble(pwkb,notbig_); 142 // double zz = this->ReadDouble(pwkb,notbig_);
138 } 143 }
  144 + if(hasM_)
  145 + {
  146 + pwkb += 8;
  147 + // double zz = this->ReadDouble(pwkb,notbig_);
  148 + }
139 return true; 149 return true;
140 } 150 }
141 151
@@ -41,6 +41,7 @@ namespace mapserver @@ -41,6 +41,7 @@ namespace mapserver
41 private: 41 private:
42 int srid_; 42 int srid_;
43 bool hasZ_; 43 bool hasZ_;
  44 + bool hasM_;
44 bool hasSrid_; 45 bool hasSrid_;
45 int notbig_; 46 int notbig_;
46 47
注册登录 后发表评论