[postgis-users] Fwd: php postgis query - incompete geometry returned??

Edel Banks osgisfyp at gmail.com
Wed Mar 19 12:01:25 PDT 2008


Hi All,


I've have a problem with querying a postgis table from php. When I run the
query in pgadmin I get one geometry result (correct one) and when I run it
in php the geometry gets shortened somehow? I've tested the pgadmin result
in openjump and the route is correct.


I'm trying to get the wkt of the geom so I can draw it on a map.



Run the query in pgadmin:

Query:

SELECT gid, source, target, astext(the_geom) from required_roads_edge where
gid IN
    (SELECT edge_id FROM shortest_path('
    SELECT gid as id, source::integer, target::integer,
    length::double precision as cost FROM required_roads',
    568, 600, false, false))


PGADMIN Result: (sorry I know it's untidy)

GID, Source, Target, Geom AsText

761;6780;8203;"MULTILINESTRING((304782.351 234010.52,304784.841 234022.038
))"
760;6677;8203;"MULTILINESTRING((304779.648 234057.624,304779.251 234053.092,
304779.236 234052.959,304779.222 234052.826,304779.208 234052.693,304779.195
234052.559,304779.181 234052.426,304779.168 234052.293,304779.155 234052.159
,304779.143 234052.025,304779.13 234051.893,304779.118 234051.76,304779.106
234051.626,304779.095 234051.493,304779.084 234051.36,304779.073 234051.226,
304779.062 234051.093,304779.052 234050.959,304779.042 234050.826,304779.032
234050.692,304779.022 234050.559,304779.013 234050.425,304779.004 234050.292
,304778.995 234050.158,304778.987 234050.024,304778.979 234049.891,
304778.971 234049.757,304778.963 234049.623,304778.956 234049.49,304778.949
234049.356,304778.942 234049.222,304778.935 234049.089,304778.929 234048.955
,304778.923 234048.821,304778.917 234048.687,304778.912 234048.554,
304778.907 234048.42,304778.902 234048.286,304778.897 234048.152,304778.893
234048.018,304778.889 234047.885,304778.885 234047.751,304778.882 234047.617
,304778.879 234047.482,304778.876 234047.348,304778.873 234047.215,
304778.871 234047.082,304778.869 234046.948,304778.867 234046.814,304778.865
234046.68,304778.864 234046.546,304778.863 234046.412,304778.863 234046.278,
304778.862 234046.144,304778.862 234046.011,304778.862 234045.877,304778.863
234045.743,304778.863 234045.609,304778.864 234045.475,304778.865 234045.341
,304778.867 234045.207,304778.869 234045.073,304778.871 234044.94,304778.873
234044.806,304778.876 234044.672,304778.879 234044.538,304778.882 234044.404
,304778.885 234044.27,304778.889 234044.136,304778.893 234044.003,304778.902
234043.735,304778.95 234043.561,304778.998 234043.388,304779.047 234043.215,
304779.095 234043.041,304779.145 234042.868,304779.193 234042.695,304779.242
234042.521,304779.291 234042.348,304779.34 234042.175,304779.39 234042.002,
304779.439 234041.829,304779.489 234041.655,304779.539 234041.482,304779.589
234041.309,304779.639 234041.136,304779.689 234040.963,304779.739 234040.791
,304779.79 234040.618,304779.84 234040.445,304779.891 234040.272,304779.942
234040.099,304779.993 234039.927,304780.044 234039.754,304780.095 234039.582
,304780.147 234039.409,304780.199 234039.236,304780.25 234039.064,304780.302
234038.892,304780.354 234038.719,304780.406 234038.547,304780.459 234038.375
,304780.511 234038.201,304780.563 234038.03,304780.616 234037.858,304780.669
234037.686,304780.722 234037.514,304780.775 234037.342,304780.828 234037.17,
304780.882 234036.998,304780.935 234036.826,304780.989 234036.654,304781.043
234036.482,304781.097 234036.31,304781.151 234036.138,304781.205 234035.967,
304781.259 234035.795,304781.314 234035.623,304781.368 234035.452,304781.423
234035.28,304781.478 234035.109,304781.533 234034.937,304781.588 234034.766,
304781.643 234034.594,304781.699 234034.423,304781.754 234034.252,304781.81
234034.081,304781.866 234033.909,304781.922 234033.737,304781.978 234033.566
,304782.034 234033.396,304782.09 234033.225,304782.147 234033.054,304782.204
234032.883,304782.26 234032.712,304782.317 234032.541,304782.374 234032.371,
304782.432 234032.2,304782.489 234032.029,304782.604 234031.688,304784.413
234026.815,304784.583 234025.197,304784.841 234022.038))"
759;6735;6677;"MULTILINESTRING((304823.67 234143.838,304819.489 234131.551,
304812.991 234114.617,304808.097 234100.855,304804.018 234089.611,304801.941
234084.949,304800 234080.622,304798.745 234077.824,304797.911 234076.428,
304795.02 234072.572,304794.836 234072.316,304794.743 234072.189,304794.65
234072.062,304794.556 234071.935,304794.461 234071.809,304794.366 234071.683
,304794.27 234071.558,304794.175 234071.433,304794.077 234071.309,304793.979
234071.185,304793.881 234071.061,304793.783 234070.938,304793.684 234070.815
,304793.584 234070.693,304793.484 234070.571,304793.383 234070.45,304793.282
234070.329,304793.18 234070.208,304793.078 234070.088,304792.975 234069.969,
304792.872 234069.85,304792.768 234069.732,304792.663 234069.614,304792.558
234069.496,304792.453 234069.379,304792.347 234069.262,304792.24 234069.146,
304792.133 234069.03,304792.025 234068.915,304791.917 234068.8,304791.809
234068.686,304791.699 234068.572,304791.59 234068.459,304791.479 234068.346,
304791.369 234068.234,304791.258 234068.122,304791.146 234068.011,304791.034
234067.9,304790.921 234067.79,304790.808 234067.68,304790.694 234067.571,
304790.58 234067.462,304790.465 234067.354,304790.35 234067.246,304790.235
234067.139,304790.118 234067.032,304790.002 234066.926,304789.885 234066.82,
304789.767 234066.715,304789.649 234066.611,304789.531 234066.507,304789.412
234066.403,304789.292 234066.3,304789.173 234066.198,304789.052 234066.096,
304788.932 234065.994,304788.81 234065.894,304788.689 234065.793,304788.566
234065.693,304788.444 234065.595,304788.321 234065.496,304788.197 234065.398
,304788.074 234065.3,304787.949 234065.203,304787.824 234065.107,304787.699
234065.011,304787.574 234064.916,304787.447 234064.821,304787.321 234064.727
,304782.475 234060.557,304779.648 234057.624))"
758;2122;2732;"MULTILINESTRING((304779.469357886 228169.531996587,304800
228148.409,304847.418 228101.887,304851.576 228097.375,304859.516 228088.758
,304870.403 228077.893))"
757;2122;14810;"MULTILINESTRING((304779.469357886 228169.531996587,
304798.047 228188.536,304800 228190.627,304823.838 228217.962,304836.749
228234.137,304843.198 228242.261,304849.312 228249.962,304861.874 228266.489
,304872.692 228281.61,304885.604 228301.302,304902.005 228328.027,304904.533
228332.061))"
133;3958;6629;"MULTILINESTRING((303938.956 234606.428,303917.994 234601.507,
303913.705 234600.471,303852.037 234585.571,303848.955 234584.697))"
132;3342;2238;"MULTILINESTRING((303896.759 234323.729,303879.022 234310.116,
303874.897 234308.466,303872.834 234308.466,303869.534 234308.879,303865.409
234310.529,303848.085 234319.191))"
131;416;12986;"MULTILINESTRING((303965.74 229707.329,303875.92 229746.28,
303847.74 229786.84))"
130;7233;3409;"MULTILINESTRING((303845.674 232881.49,303861.009 232881.49,
303874.244 232882.337,303885.798 232881.914,303898.192 232881.702,303904.284
232882.549,303910.586 232896.944,303914.062 232921.465))"
111;6571;14214;"MULTILINESTRING((303804.663 234157.77,303813.999 234148.393,
303821.629 234141.348))"
108;13143;11727;"MULTILINESTRING((303801.341 233214.634,303810.748
233208.974))"
107;13143;7930;"MULTILINESTRING((303801.341 233214.634,303807.423 233225.015
,303813.112 233233.886,303817.696 233238.413,303820.655 233239.766))"
106;6209;4648;"MULTILINESTRING((303798.797 233823.753,303826.14 233810.242,
303838.03 233803.534,303845.28 233800.312))"
602;10821;8922;"MULTILINESTRING((304624.166 233950.73,304629.284 233945.475,
304629.376 233945.32,304629.468 233945.166,304629.562 233945.012,304629.657
233944.859,304629.753 233944.706,304629.85 233944.555,304629.949 233944.404,
304630.048 233944.254,304630.148 233944.104,304630.25 233943.955,304630.353
233943.807,304630.456 233943.66,304630.561 233943.514,304630.667 233943.368,
304630.774 233943.223,304630.882 233943.079,304630.99 233942.935,304631.1
233942.793,304631.211 233942.651,304631.324 233942.51,304631.437 233942.37,
304631.551 233942.23,304631.666 233942.092,304631.782 233941.954,304631.899
233941.817,304632.017 233941.681,304632.136 233941.546,304632.256 233941.412
,304632.377 233941.278,304632.499 233941.146,304632.622 233941.013,
304632.746 233940.883,304632.871 233940.754,304632.996 233940.625,304633.123
233940.497,304633.251 233940.37,304633.379 233940.244,304633.509 233940.118,
304633.639 233939.994,304633.77 233939.871,304633.902 233939.748,304634.035
233939.627,304634.169 233939.506,304634.304 233939.387,304634.44 233939.268,
304634.576 233939.151,304634.713 233939.034,304634.852 233938.919,304634.991
233938.804,304635.13 233938.691,304635.271 233938.578,304635.411 233938.467,
304635.555 233938.357,304635.698 233938.247,304635.842 233938.139,304635.986
233938.031,304636.132 233937.925,304636.278 233937.82,304636.425 233937.716,
304636.573 233937.613,304636.721 233937.511,304636.87 233937.41,304637.02
233937.31,304637.171 233937.211,304637.322 233937.114,304637.474 233937.017,
304637.627 233936.922,304637.78 233936.827,304638.089 233936.642,304645.242
233932.785,304651.023 233929.584,304656.757 233926.763,304662.007 233924.133
))"
601;10821;1661;"MULTILINESTRING((304624.166 233950.73,304627.93 233953.84,
304628.029 233953.916,304628.127 233953.993,304628.224 233954.071,304628.321
233954.15,304628.417 233954.23,304628.512 233954.311,304628.607 233954.393,
304628.7 233954.475,304628.793 233954.559,304628.885 233954.643,304628.976
233954.728,304629.066 233954.814,304629.156 233954.9,304629.245 233954.988,
304629.332 233955.077,304629.419 233955.167,304629.505 233955.258,304629.591
233955.349,304629.675 233955.441,304629.759 233955.534,304629.841 233955.627
,304629.923 233955.722,304630.004 233955.817,304630.084 233955.913,
304630.163 233956.009,304630.241 233956.107,304630.318 233956.205,304630.394
233956.304,304630.469 233956.403,304630.543 233956.504,304630.617 233956.605
,304630.689 233956.706,304630.76 233956.809,304630.831 233956.912,304630.9
233957.016,304630.968 233957.12,304631.036 233957.225,304631.102 233957.331,
304631.167 233957.437,304631.232 233957.544,304631.295 233957.652,304631.357
233957.76,304631.418 233957.869,304631.479 233957.978,304631.538 233958.088,
304631.596 233958.198,304631.653 233958.309,304631.709 233958.421,304631.764
233958.533,304631.817 233958.646,304631.87 233958.759,304631.922 233958.872,
304631.972 233958.987,304632.022 233959.101,304632.07 233959.216,304632.117
233959.332,304632.164 233959.448,304632.209 233959.564,304632.253 233959.681
,304632.295 233959.798,304632.337 233959.916,304632.378 233960.034,
304632.417 233960.152,304632.455 233960.271,304632.492 233960.39,304632.528
233960.51,304632.563 233960.63,304632.597 233960.75,304632.661 233960.991,
304634.288 233966.106,304638.812 233979.1,304639.97 233982.639))"
600;3252;9535;"MULTILINESTRING((304622.671 233506.685,304622.99 233506.692,
304623.308 233506.696,304623.627 233506.698,304623.946 233506.697,304624.265
233506.693,304624.584 233506.686,304624.902 233506.677,304625.221 233506.664
,304625.539 233506.649,304625.858 233506.632,304626.176 233506.611,
304626.494 233506.588,304626.811 233506.562,304627.129 233506.533,304627.446
233506.501,304627.763 233506.467,304628.08 233506.43,304628.396 233506.39,
304628.712 233506.347,304629.028 233506.302,304629.343 233506.254,304629.657
233506.203,304629.972 233506.15,304630.286 233506.093,304630.599 233506.034,
304630.912 233505.973,304631.224 233505.908,304631.535 233505.841,304631.847
233505.771,304632.157 233505.699,304632.467 233505.624,304632.776 233505.546
,304633.084 233505.465,304633.392 233505.382,304633.699 233505.296,
304634.005 233505.207,304634.311 233505.116,304634.615 233505.022,304634.919
233504.926,304635.222 233504.826,304635.524 233504.725,304635.826 233504.62,
304636.126 233504.513,304636.425 233504.404,304636.724 233504.291,304637.021
233504.176,304637.317 233504.059,304637.613 233503.939,304637.907 233503.817
,304638.2 233503.691,304638.493 233503.564,304638.784 233503.434,304639.073
233503.301,304639.362 233503.166,304639.65 233503.027,304639.936 233502.888,
304640.221 233502.745,304640.505 233502.6,304640.788 233502.453,304641.069
233502.303,304641.349 233502.15,304641.627 233501.995,304641.905 233501.838,
304642.181 233501.678,304642.455 233501.516,304642.728 233501.351,304643
233501.185,304643.27 233501.015,304643.806 233500.67,304644.098 233500.519,
304644.389 233500.368,304644.681 233500.216,304644.971 233500.064,304645.262
233499.911,304645.553 233499.757,304645.843 233499.604,304646.133 233499.449
,304646.422 233499.294,304646.712 233499.139,304647.001 233498.983,304647.29
233498.826,304647.578 233498.669,304647.866 233498.512,304648.154 233498.354
,304648.442 233498.195,304648.729 233498.037,304649.017 233497.877,
304649.303 233497.717,304649.59 233497.557,304649.876 233497.396,304650.162
233497.234,304650.448 233497.072,304650.734 233496.91,304651.019 233496.747,
304651.303 233496.583,304651.588 233496.419,304651.872 233496.255,304652.156
233496.09,304652.44 233495.925,304652.724 233495.759,304653.007 233495.592,
304653.289 233495.425,304653.572 233495.258,304653.854 233495.09,304654.136
233494.921,304654.418 233494.752,304654.699 233494.583,304654.98 233494.413,
304655.262 233494.243,304655.542 233494.072,304655.822 233493.9,304656.102
233493.728,304656.381 233493.556,304656.66 233493.382,304656.939 233493.209,
304657.218 233493.036,304657.496 233492.861,304657.774 233492.687,304658.052
233492.511,304658.33 233492.335,304658.607 233492.159,304658.884 233491.982,
304659.16 233491.805,304659.436 233491.627,304659.712 233491.449,304659.988
233491.27,304660.263 233491.091,304660.538 233490.911,304660.812 233490.731,
304661.087 233490.551,304661.361 233490.369,304661.634 233490.188,304661.908
233490.006,304662.181 233489.823,304662.453 233489.64,304662.726 233489.456,
304662.998 233489.272,304663.541 233488.903,304668.194 233485.961,304672.321
233483.964,304680.263 233475.849,304682.211 233473.429,304683.293 233471.512
,304684.888 233468.087,304687.119 233463.993,304689.079 233461.242,
304690.716 233459.119,304691.851 233458.092,304693.498 233456.847,304695.534
233455.673,304697.625 233454.714,304701.189 233453.542,304705.744 233452.566
,304709.511 233451.903,304712.766 233451.682,304717.197 233451.556,
304719.093 233451.596,304720.743 233451.939,304722.577 233452.768,304723.098
233453.093,304723.636 233453.675,304724.209 233454.432,304724.775 233455.634
,304725.831 233458.423,304726.465 233460.567,304736.305 233492.381,
304743.304 233514.741,304743.805 233516.167,304744.282 233517.878,304744.654
233520.752,304744.818 233521.982,304744.007 233532.055))"
599;8860;2319;"MULTILINESTRING((304622.11 233459.818,304632.748 233447.671,
304641.194 233439.489,304641.285 233439.386,304641.375 233439.282,304641.464
233439.176,304641.551 233439.07,304641.638 233438.962,304641.722 233438.854,
304641.806 233438.744,304641.888 233438.633,304641.968 233438.522,304642.048
233438.408,304642.125 233438.296,304642.202 233438.181,304642.277 233438.065
,304642.35 233437.949,304642.423 233437.832,304642.493 233437.713,304642.562
233437.594,304642.63 233437.474,304642.696 233437.354,304642.761 233437.232,
304642.824 233437.11,304642.886 233436.986,304642.946 233436.863,304643.005
233436.738,304643.062 233436.613,304643.117 233436.486,304643.171 233436.36,
304643.223 233436.232,304643.274 233436.104,304643.323 233435.976,304643.371
233435.846,304643.417 233435.717,304643.461 233435.586,304643.504 233435.455
,304643.546 233435.324,304643.584 233435.192,304643.622 233435.059,304643.66
233434.926,304643.693 233434.793,304643.726 233434.659,304643.757 233434.525
,304643.787 233434.391,304643.815 233434.256,304643.841 233434.121,
304643.866 233433.985,304643.888 233433.849,304643.91 233433.712,304643.929
233433.577,304643.947 233433.44,304643.963 233433.303,304643.977 233433.166,
304643.99 233433.029,304644.001 233432.892,304644.003 233432.855))"
598;3252;8860;"MULTILINESTRING((304622.671 233506.685,304622.515 233496.189,
304622.66 233473.004,304622.778 233465.116,304622.11 233459.818))"
597;810;4024;"MULTILINESTRING((304622.064 231878.006,304644.189 231877.9,
304663.844 231877.874,304674.544 231878.515,304683.191 231880.049,304689.586
231881.724))"
596;663;8635;"MULTILINESTRING((304621.251 235149.758,304623.164 235155.13,
304626.662 235164.379,304629.711 235171.858,304633.697 235180.655,304637.107
235186.94,304640.112 235192.418,304643.133 235198.075))"
595;9398;14436;"MULTILINESTRING((304628.334 233646.201,304628.233 233645.359
,304621.206 233618.902))"
594;812;3292;"MULTILINESTRING((304654.68 231750.313,304652.929 231779.574,
304651.875 231795.079,304650.302 231801.777,304644.091 231804.555,304632.886
231805.363,304620.84 231805.17))"
593;675;14168;"MULTILINESTRING((304619.263 234154.292,304621.677 234160.107,
304627.654 234173.459,304633.138 234186.402,304638.994 234198.691,304643.423
234207.679))"
592;3628;5980;"MULTILINESTRING((304618.507 234027.121,304654.666 234015.769
))"
591;8743;3628;"MULTILINESTRING((304637.848 234082.2,304629.86 234048.985,
304625.987 234044.006,304623.973 234041.417,304621.451 234036.792,304618.507
234027.121))"
590;2453;13256;"MULTILINESTRING((304615.141 235131.411,304622.592 235129.962
,304628.652 235129.07,304643.073 235127.325,304660.88 235124.234))"
589;2453;663;"MULTILINESTRING((304615.141 235131.411,304617.601 235139.36,
304620.058 235146.409,304621.251 235149.758))"
588;1222;4315;"MULTILINESTRING((304962.589 235254.22,304955.279 235248.865,
304938.178 235235.866,304919.633 235220.8,304919.372 235220.592,304905.306
235209.413,304890.008 235197.429,304873.498 235184.981,304857.517 235173.164
,304840.209 235160.583,304800 235133.053,304763.242 235107.933,304744.854
235095.316,304739.237 235091.305,304727.72 235083.083,304710.247 235070.763,
304693.615 235058.478,304677.017 235046.454,304661.992 235034.919,304650.55
235027.515,304646.757 235025.061,304629.198 235013.12,304614.328 235019.138
))"
587;13834;4315;"MULTILINESTRING((304902.649 235329.346,304898.105 235325.235
,304891.564 235319.058,304878.972 235305.781,304863.032 235288.34,304860.262
235285.419,304842.642 235266.835,304800 235221.87,304747.949 235167.581,
304728.049 235147.733,304705.596 235125.098,304692.741 235111.98,304687.839
235106.308,304674.869 235091.747,304654.405 235069.828,304614.328 235019.138
))"
586;11620;4315;"MULTILINESTRING((304931.073 235291.733,304904.524 235269.57,
304898.414 235264.316,304874.369 235243.426,304844.725 235217.79,304800
235179.112,304742.288 235129.234,304733.419 235121.511,304724.335 235113.563
,304716.508 235106.899,304703.26 235095.596,304691.077 235085.191,304680.726
235076.401,304614.328 235019.138))"
585;9571;10821;"MULTILINESTRING((304613.648 233961.334,304618.606 233956.057
,304624.166 233950.73))"
584;11424;8677;"MULTILINESTRING((304642.553 234393.351,304637.7 234386.315,
304623.028 234366.974,304617.846 234359.563,304613.294 234352.942))"
580;9631;12881;"MULTILINESTRING((304614.65 234263.935,304607.8 234255.604,
304603.703 234248.654))"
779;9600;2904;"MULTILINESTRING((304810.187 229263.839,304866.856 229285.636,
304870.227 229287.827))"
778;14712;9600;"MULTILINESTRING((305040.039 229172.433,305020.256 229184.227
,304980.072 229207.645,304924.557 229239.912,304896.251 229255.268,
304886.506 229259.919,304884.08 229261.077,304870.627 229261.877,304858.321
229263.432,304842.117 229264.222,304810.187 229263.839))"
777;1874;5939;"MULTILINESTRING((304805.384 231372.346,304807.846 231362.742,
304812.525 231354.37,304818.435 231347.968,304824.345 231343.781,304834.687
231341.073,304844.045 231342.058,304852.91 231344.274,304859.558 231347.968,
304902.024 231372.806))"
776;1874;3656;"MULTILINESTRING((304805.384 231372.346,304811.54 231376.778,
304851.233 231400))"



Run the copy and pasted query in PHP and get the result:

<route>
−
    <edge>
<gid>761</gid>
<source>6780</source>
<target>8203</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>760</gid>
<source>6677</source>
<target>8203</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>759</gid>
<source>6735</source>
<target>6677</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>758</gid>
<source>2122</source>
<target>2732</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>757</gid>
<source>2122</source>
<target>14810</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>133</gid>
<source>3958</source>
<target>6629</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>132</gid>
<source>3342</source>
<target>2238</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>131</gid>
<source>416</source>
<target>12986</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>130</gid>
<source>7233</source>
<target>3409</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>111</gid>
<source>6571</source>
<target>14214</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>108</gid>
<source>13143</source>
<target>11727</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>107</gid>
<source>13143</source>
<target>7930</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>106</gid>
<source>6209</source>
<target>4648</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>602</gid>
<source>10821</source>
<target>8922</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>601</gid>
<source>10821</source>
<target>1661</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>600</gid>
<source>3252</source>
<target>9535</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>599</gid>
<source>8860</source>
<target>2319</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>598</gid>
<source>3252</source>
<target>8860</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>597</gid>
<source>810</source>
<target>4024</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>596</gid>
<source>663</source>
<target>8635</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>595</gid>
<source>9398</source>
<target>14436</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>594</gid>
<source>812</source>
<target>3292</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>593</gid>
<source>675</source>
<target>14168</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>592</gid>
<source>3628</source>
<target>5980</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>591</gid>
<source>8743</source>
<target>3628</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>590</gid>
<source>2453</source>
<target>13256</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>589</gid>
<source>2453</source>
<target>663</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>588</gid>
<source>1222</source>
<target>4315</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>587</gid>
<source>13834</source>
<target>4315</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>586</gid>
<source>11620</source>
<target>4315</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>585</gid>
<source>9571</source>
<target>10821</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>584</gid>
<source>11424</source>
<target>8677</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>580</gid>
<source>9631</source>
<target>12881</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>779</gid>
<source>9600</source>
<target>2904</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>778</gid>
<source>14712</source>
<target>9600</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>777</gid>
<source>1874</source>
<target>5939</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
−
    <edge>
<gid>776</gid>
<source>1874</source>
<target>3656</target>
−
    <wkt>
MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))
</wkt>
</edge>
</route>


As you can see for some of the edges the geometry returned is smaller.


Edge with GID 760 wkt is:

PGADMIN:

"MULTILINESTRING((304779.648 234057.624,304779.251 234053.092,304779.236
234052.959,304779.222 234052.826,304779.208 234052.693,304779.195 234052.559
,304779.181 234052.426,304779.168 234052.293,304779.155 234052.159,
304779.143 234052.025,304779.13 234051.893,304779.118 234051.76,304779.106
234051.626,304779.095 234051.493,304779.084 234051.36,304779.073 234051.226,
304779.062 234051.093,304779.052 234050.959,304779.042 234050.826,304779.032
234050.692,304779.022 234050.559,304779.013 234050.425,304779.004 234050.292
,304778.995 234050.158,304778.987 234050.024,304778.979 234049.891,
304778.971 234049.757,304778.963 234049.623,304778.956 234049.49,304778.949
234049.356,304778.942 234049.222,304778.935 234049.089,304778.929 234048.955
,304778.923 234048.821,304778.917 234048.687,304778.912 234048.554,
304778.907 234048.42,304778.902 234048.286,304778.897 234048.152,304778.893
234048.018,304778.889 234047.885,304778.885 234047.751,304778.882 234047.617
,304778.879 234047.482,304778.876 234047.348,304778.873 234047.215,
304778.871 234047.082,304778.869 234046.948,304778.867 234046.814,304778.865
234046.68,304778.864 234046.546,304778.863 234046.412,304778.863 234046.278,
304778.862 234046.144,304778.862 234046.011,304778.862 234045.877,304778.863
234045.743,304778.863 234045.609,304778.864 234045.475,304778.865 234045.341
,304778.867 234045.207,304778.869 234045.073,304778.871 234044.94,304778.873
234044.806,304778.876 234044.672,304778.879 234044.538,304778.882 234044.404
,304778.885 234044.27,304778.889 234044.136,304778.893 234044.003,304778.902
234043.735,304778.95 234043.561,304778.998 234043.388,304779.047 234043.215,
304779.095 234043.041,304779.145 234042.868,304779.193 234042.695,304779.242
234042.521,304779.291 234042.348,304779.34 234042.175,304779.39 234042.002,
304779.439 234041.829,304779.489 234041.655,304779.539 234041.482,304779.589
234041.309,304779.639 234041.136,304779.689 234040.963,304779.739 234040.791
,304779.79 234040.618,304779.84 234040.445,304779.891 234040.272,304779.942
234040.099,304779.993 234039.927,304780.044 234039.754,304780.095 234039.582
,304780.147 234039.409,304780.199 234039.236,304780.25 234039.064,304780.302
234038.892,304780.354 234038.719,304780.406 234038.547,304780.459 234038.375
,304780.511 234038.201,304780.563 234038.03,304780.616 234037.858,304780.669
234037.686,304780.722 234037.514,304780.775 234037.342,304780.828 234037.17,
304780.882 234036.998,304780.935 234036.826,304780.989 234036.654,304781.043
234036.482,304781.097 234036.31,304781.151 234036.138,304781.205 234035.967,
304781.259 234035.795,304781.314 234035.623,304781.368 234035.452,304781.423
234035.28,304781.478 234035.109,304781.533 234034.937,304781.588 234034.766,
304781.643 234034.594,304781.699 234034.423,304781.754 234034.252,304781.81
234034.081,304781.866 234033.909,304781.922 234033.737,304781.978 234033.566
,304782.034 234033.396,304782.09 234033.225,304782.147 234033.054,304782.204
234032.883,304782.26 234032.712,304782.317 234032.541,304782.374 234032.371,
304782.432 234032.2,304782.489 234032.029,304782.604 234031.688,304784.413
234026.815,304784.583 234025.197,304784.841 234022.038))"


PHP Script:

MULTILINESTRING((304782.351 234010.52,304784.841 234022.038))


In PHP I'm using $wkt = pg_result($spf, 0, 3) to retrieve the individual
fields.

Does anybody know why this is happening? Is it something I'm doing wrong?


Thanks for the help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080319/75c81c93/attachment.html>


More information about the postgis-users mailing list