Opened 5 years ago

Closed 5 years ago

#4238 closed defect (fixed)

st_asmvtgeom in 2.5 throws out geometries

Reported by: nextstopsun Owned by: pramsey
Priority: medium Milestone: PostGIS 2.5.1
Component: postgis Version: 2.5.x -- EOL
Keywords: Cc:

Description

Regression in st_asmvtgeom function detected.

Reproducible with a query

select
  st_asmvtgeom(
     st_geomfromtext('MULTIPOLYGON(((4182673.08416798 7516945.7218508,4182645.50865042 7516913.84633964,4182540.17211609 7516780.93323208,4182420.0181199 7516627.08732236,4182331.58619947 7516515.19633399,4182224.09191281 7516378.55353141,4182127.65257295 7516256.19786991,4182018.1400668 7516116.89141414,4181931.74364355 7516006.06813352,4181859.56199645 7515913.4937724,4181793.52876811 7515828.80904342,4181683.34869333 7515914.74352159,4181464.04624578 7516087.05420006,4181337.58345718 7516189.0230206,4181091.68446227 7516383.29643722,4181033.35987717 7516429.36762681,4180624.6410166 7516750.08321728,4180557.26570229 7516802.90012624,4180175.95802814 7517101.85688247,4180163.157577 7517111.89306521,4180007.52270146 7517234.60093094,4179768.6998383 7517422.88806778,4179711.60130751 7517468.15423855,4179410.93168206 7517706.55103038,4179311.82164053 7517784.63950737,4178766.24596246 7518214.50002336,4178604.13782367 7518340.53734427,4178441.11951779 7518467.28525581,4178156.37420431 7518687.6541335,4177986.66874204 7518818.26127235,4177959.80351082 7518838.94326036,4177930.48840837 7518859.30609074,4177926.99259432 7518861.74463609,4177889.33546813 7518884.37015108,4177848.30578237 7518907.7085306,4177823.31779038 7518919.70865043,4177777.74289846 7518941.59001789,4177702.47573896 7518976.2912076,4177568.60465137 7519038.00056643,4177284.2247127 7519166.09821377,4176915.75892635 7519337.15744916,4176911.4458606 7519339.15119481,4176827.11871501 7519377.95776123,4176761.43312196 7519408.1872132,4176649.959729 7519459.48477304,4176592.68074297 7519485.25978974,4176567.84848519 7519496.42055881,4176485.02644864 7519533.67604136,4176403.81929075 7519571.85550819,4176338.35497618 7519598.28919455,4175696.41821493 7519889.38606409,4176149.63304533 7520805.90434393,4176158.12331682 7520813.4218682,4176170.75947178 7520821.13424673,4176181.81767465 7520831.02480171,4176219.54145814 7520894.32790891,4176247.88246532 7520951.17090635,4176267.63514895 7520990.2583732,4176274.2608614 7521003.335001,4176280.61958553 7521013.36903777,4176292.73223982 7521028.29497478,4176307.29458218 7521040.39120971,4176321.98068832 7521049.9785301,4176346.64659057 7521064.15424401,4176351.62296562 7521069.45021096,4176376.58016266 7521128.91580589,4176432.94591256 7521223.38530627,4176483.57124739 7521248.83765159,4176507.77628627 7521262.47950915,4176530.62304904 7521262.13383235,4176570.59740901 7521261.82278155,4176591.38980495 7521261.57354772,4176594.55208942 7521288.23875733,4176612.53718296 7521287.5578125,4176612.93672288 7521294.34078165,4176663.67140025 7521287.05111927,4176668.62387992 7521307.5805074,4176521.93004207 7521326.73722501,4176701.66482433 7521686.17919508,4176727.07554479 7521712.46055621,4176759.03031619 7521714.92499835,4176881.94835598 7521723.92876714,4177169.01073986 7521747.74624268,4177275.49534297 7521756.5784811,4177472.83767317 7521771.18729521,4177490.89725353 7521772.18052605,4177717.53916966 7521784.65070178,4177799.86370216 7521788.01536662,4177895.69824976 7521783.45446949,4177978.01734694 7521774.37843346,4178096.41393982 7521753.98515967,4178165.17736124 7521731.3357606,4178291.45947561 7521679.29650649,4178388.4042055 7521624.99244403,4178474.07197265 7521570.71107691,4178580.02096001 7521490.40301735,4178651.02775605 7521419.17027473,4178786.25948903 7521285.73006177,4178839.93156773 7521231.87909066,4178981.21737883 7521090.12037172,4179006.94136444 7521064.44374034,4179170.52257404 7520900.15447222,4179249.13340429 7520825.51861373,4179385.43230798 7520699.83501471,4179572.31981949 7520507.80639563,4179895.40028218 7520177.97768244,4179999.68008625 7520074.64553928,4179984.536428 7520059.49456308,4179980.72473784 7520051.8488213,4179965.82085027 7520039.26316585,4179977.25108388 7520009.75747632,4180009.12684349 7519921.24268873,4180021.88547218 7519887.85804719,4180041.36574867 7519845.16420544,4180047.55031594 7519836.89424642,4180018.31638182 7519816.41842198,4180037.15521942 7519790.6922866,4180100.89231637 7519698.06509596,4180195.66436068 7519564.08942476,4180282.85800514 7519436.82727227,4180367.03364115 7519313.09081022,4180461.52616995 7519173.99543871,4180584.8322502 7518998.34071265,4180637.97216554 7518922.39469353,4180703.48078228 7518821.05517443,4180743.43723136 7518754.42389199,4180797.2874038 7518660.79731462,4180824.63775016 7518613.67267409,4180856.87802868 7518555.83599673,4180891.60033455 7518494.99146877,4180934.39057356 7518424.90889705,4180978.24370531 7518353.26055326,4181037.49790093 7518255.02577639,4181109.95544696 7518135.34746679,4181212.68323685 7517966.51805314,4181271.61308401 7517869.51389149,4181308.15959335 7517811.51703562,4181363.10700261 7517729.56441169,4181444.81853254 7517609.45600892,4181532.96260796 7517481.30382175,4181549.94735803 7517462.13369628,4181573.7096009 7517440.84097103,4181591.16118833 7517427.82409063,4181688.85478877 7517364.02807035,4181839.17002617 7517265.94596613,4181974.44075615 7517176.78673896,4182151.04955174 7517061.06904214,4182162.20566193 7517054.51340706,4182171.66706642 7517049.86413455,4182175.36719144 7517048.04469909,4182263.33725548 7517002.48821678,4182765.38591233 7517034.29047318,4182742.17758545 7517019.65740735,4182722.18729804 7517002.16652589,4182705.19143163 7516985.17219847,4182673.08416798 7516945.7218508)))')
    ,st_geomfromtext('POLYGON((3757032.81375 8140237.763125,3757032.81375 7514065.6275,4383204.949375 7514065.6275,4383204.949375 8140237.763125,3757032.81375 8140237.763125))')
    ,4096
    ,0
  );

On postgis 2.4.5 it returns good output, while on 2.5.0 it throws input geometry out.

Offtop: If someone goes after fixing this one, please add an argument to st_asmvt to encode a column as feature ids.

Change History (1)

comment:1 by Algunenano, 5 years ago

Resolution: fixed
Status: newclosed

On postgis 2.4.5 it returns good output, while on 2.5.0 it throws input

geometry out.

Hi, this should be fixed in the upcoming 2.5.1.

# 2.5.0 (Ubuntu 16.04 from http://apt.postgresql.org/pub/repos/apt/)

MULTILINESTRING((2745 4049,2744 4049),(2785 4077,2784 4077))

# 2.5.0 from source

MULTILINESTRING((2745 4049,2744 4049),(2785 4077,2784 4077))

# svn-2.5 (future 2.5.1) from source:

MULTIPOLYGON(((2744 4049,2745 4046,2753 4046,2757 4047,2767 4057,2767 4059,2777 4074,2782 4077,2784 4077,2779 4084,2753 4064,2739 4058,2742 4051,2743 4049,2744 4049)))

# 3.0 from source:

MULTIPOLYGON(((2744 4049,2745 4046,2753 4046,2757 4047,2767 4057,2767 4059,2777 4074,2782 4077,2784 4077,2779 4084,2753 4064,2739 4058,2742 4051,2743 4049,2744 4049)))

Offtop: If someone goes after fixing this one, please add an argument to st_asmvt to encode a column as feature ids.

New features won't be available until 3.0 ships.

Thanks for reporting!

Note: See TracTickets for help on using tickets.