[postgis-tickets] [PostGIS] #2635: Geography Regress difference between 2.0.4 and 2.1.1 ST_Buffer (_ST_BestSRID has changed) (was: Geography Regress difference between 2.0.4 and 2.1.1 ST_Buffer)

PostGIS trac at osgeo.org
Sun Mar 9 16:09:51 PDT 2014


#2635: Geography Regress difference between 2.0.4 and 2.1.1 ST_Buffer
(_ST_BestSRID has changed)
---------------------+------------------------------------------------------
 Reporter:  robe     |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  medium   |   Milestone:  PostGIS 2.1.2
Component:  postgis  |     Version:  2.1.x        
 Keywords:           |  
---------------------+------------------------------------------------------

Comment(by robe):

 hmm I think the underling problem with this might be your _ST_BestSRID
 math changed so might be very well expected.  If I run this:


 {{{
 SELECT _ST_BestSRID(ST_GeogFromText('POLYGON((-8.1111111
 60,-8.16875525879031 59.4147290339516,-8.33947250246614
 58.8519497029047,-8.61670226309236 58.3332893009412,-8.98979075644036
 57.8786796564404,-9.44440040094119 57.5055911630924,-9.96306080290473
 57.2283614024661,-10.5258401339516 57.0576441587903,-11.1111111
 57,-11.6963820660484 57.0576441587903,-12.2591613970953
 57.2283614024661,-12.7778217990588 57.5055911630924,-13.2324314435596
 57.8786796564404,-13.6055199369076 58.3332893009412,-13.8827496975339
 58.8519497029047,-14.0534669412097 59.4147290339516,-14.1111111
 60,-14.0534669412097 60.5852709660484,-13.8827496975339
 61.1480502970953,-13.6055199369076 61.6667106990588,-13.2324314435597
 62.1213203435596,-12.7778217990588 62.4944088369076,-12.2591613970953
 62.7716385975339,-11.6963820660484 62.9423558412097,-11.1111111
 63,-10.5258401339516 62.9423558412097,-9.96306080290474
 62.7716385975339,-9.4444004009412 62.4944088369076,-8.98979075644036
 62.1213203435596,-8.61670226309237 61.6667106990588,-8.33947250246614
 61.1480502970953,-8.16875525879031 60.5852709660484,-8.1111111 60))') );
 }}}

 In
 {{{
 POSTGIS="2.0.4" GEOS="3.4.2-CAPI-1.8.2 r0" PROJ="Rel. 4.8.0, 6 March 2012"
 GDAL="GDAL 1.10.0, released 2013/04/24" LIBXML="2.7.8" LIBJSON="UNKNOWN"
 (core procs from "2.0.4" need upgrade) TOPOLOGY (topology procs from
 "2.0.4" need upgrade) RASTER (raster procs from "2.0.4" need upgrade)

 I get:
 999000
 }}}

 If I run the same query in

 {{{
 POSTGIS="2.1.2dev r12312" GEOS="3.4.2-CAPI-1.8.2 r3924" PROJ="Rel. 4.8.0,
 6 March 2012" GDAL="GDAL 1.10.0, released 2013/04/24" LIBXML="2.7.8"
 LIBJSON="UNKNOWN" RASTER

 I get:
 999264
 }}}

 In fact 999264 is illegal in PostGIS 2.0.4

 Now I'd be able to leave this alone and chuck it up to this polygon is
 just too big to suitably convert to planar projection.

 since both 2.0.4 and 2.1.2dev agree that


 {{{
 SELECT ST_Area(ST_GeogFromText('POLYGON((-8.1111111 60,-8.16875525879031
 59.4147290339516,-8.33947250246614 58.8519497029047,-8.61670226309236
 58.3332893009412,-8.98979075644036 57.8786796564404,-9.44440040094119
 57.5055911630924,-9.96306080290473 57.2283614024661,-10.5258401339516
 57.0576441587903,-11.1111111 57,-11.6963820660484
 57.0576441587903,-12.2591613970953 57.2283614024661,-12.7778217990588
 57.5055911630924,-13.2324314435596 57.8786796564404,-13.6055199369076
 58.3332893009412,-13.8827496975339 58.8519497029047,-14.0534669412097
 59.4147290339516,-14.1111111 60,-14.0534669412097
 60.5852709660484,-13.8827496975339 61.1480502970953,-13.6055199369076
 61.6667106990588,-13.2324314435597 62.1213203435596,-12.7778217990588
 62.4944088369076,-12.2591613970953 62.7716385975339,-11.6963820660484
 62.9423558412097,-11.1111111 63,-10.5258401339516
 62.9423558412097,-9.96306080290474 62.7716385975339,-9.4444004009412
 62.4944088369076,-8.98979075644036 62.1213203435596,-8.61670226309237
 61.6667106990588,-8.33947250246614 61.1480502970953,-8.16875525879031
 60.5852709660484,-8.1111111 60))'));
 }}}

 is:
 {{{
 174585439562.186
 }}}

 Also the output of this in 2.1.2

 {{{
 SELECt
 ST_Transform(ST_Buffer(ST_Transform(ST_GeomFromText('POLYGON((-8.1111111
 60,-8.16875525879031 59.4147290339516,-8.33947250246614
 58.8519497029047,-8.61670226309236 58.3332893009412,-8.98979075644036
 57.8786796564404,-9.44440040094119 57.5055911630924,-9.96306080290473
 57.2283614024661,-10.5258401339516 57.0576441587903,-11.1111111
 57,-11.6963820660484 57.0576441587903,-12.2591613970953
 57.2283614024661,-12.7778217990588 57.5055911630924,-13.2324314435596
 57.8786796564404,-13.6055199369076 58.3332893009412,-13.8827496975339
 58.8519497029047,-14.0534669412097 59.4147290339516,-14.1111111
 60,-14.0534669412097 60.5852709660484,-13.8827496975339
 61.1480502970953,-13.6055199369076 61.6667106990588,-13.2324314435597
 62.1213203435596,-12.7778217990588 62.4944088369076,-12.2591613970953
 62.7716385975339,-11.6963820660484 62.9423558412097,-11.1111111
 63,-10.5258401339516 62.9423558412097,-9.96306080290474
 62.7716385975339,-9.4444004009412 62.4944088369076,-8.98979075644036
 62.1213203435596,-8.61670226309237 61.6667106990588,-8.33947250246614
 61.1480502970953,-8.16875525879031 60.5852709660484,-8.1111111
 60))',4326),999264), 0.5), 4326)::geography;


 }}}

 feeding into both 2.0.4 and 2.1.2dev yields the same answer
 {{{
 SELECT
 ST_Area('0103000020E61000000100000047000000CDF71C64E23820C05033F10000004E4085D12364E23820C0CFC016FDFFFF4D404F507EF2655620C054326ED415B54D40A8B4D3F5655620C044D64DD015B54D4086D6B63ACEAD20C01DAC38A90C6D4D4069715742CEAD20C0E71EABA40C6D4D40A04D5355BF3B21C08C620B2EA92A4D40C5472263BF3B21C0774CEE28A92A4D40A43546DAC4FA21C091940B8378F04C404A0285F1C4FA21C0D4054C7D78F04C40DF41358B87E322C075366920B7C04C40767B15B187E322C043F7291AB7C04C40074F158C15ED23C0A6AE98D63A9D4C405F1D3EC715ED23C086D590D03A9D4C403E6C7B623A0D25C0038AB1C060874C402425F58A3A0D25C01B302CBE60874C40A90F04B63A0D25C09E119FBC60874C4000916A56E33826C0E2BA6EDAFF7F4C404380DA86E33826C0A6D0D3D9FF7F4C402EBD83B7E33826C0AE7271DAFF7F4C409EA9EF578C6427C0CA97A2BC60874C400FC9E8848C6427C056E542BE60874C40C63279AF8C6427C0D79AEAC060874C40BC10CB4AB18428C02AB3CAD03A9D4C40B728478AB18428C0051344D73A9D4C4015F26C653F8E29C08DD4D61AB7C04C40DF92088E3F8E29C044AF8821B7C04C40CF4CE92702772AC0CE4F6E7E78F04C40D241754002772AC0B5297F8478F04C4065C7C9B707362BC06F3D662AA92A4D409EDD12C607362BC0A26DAF2FA92A4D403A8036D9F8C32BC075DD54A60C6D4D40C6A9F0E0F8C32BC09882F0AA0C6D4D4019CDEC25611B2CC0E54E0CD215B54D40E7453D29611B2CC0A60525D615B54D40BCF89EB7E4382CC080A7D4FEFFFF4D40157DA6B7E4382CC07922980200004E405D633434611B2CC0B2B6592BEA4A4E409CD75431611B2CC00F2DF82EEA4A4E4035DA8DF6F8C32BC05F944856F3924E40B7686BF0F8C32BC056B3F859F3924E40023209E607362BC08793F1D056D54E40280638DB07362BC07B05F6D456D54E407AFA7B6A02772AC0B185487B870F4F4031C59D5702772AC07EBDF27F870F4F4084EF83C13F8E29C028F750DD483F4F407019609F3F8E29C07474EDE2483F4F40078BADC4B18428C0AE85F526C5624F40511EA885B18428C04109552DC5624F40400E65E78C6427C0A73C8F3D9F784F4031101EB48C6427C04240AD409F784F401824B07C8C6427C0E3B5B0429F784F40DD4FEED6E33826C0FC89042500804F409049A493E33826C09AD2CF2500804F40657F1B50E33826C0EF43012500804F40516660AA3A0D25C03E90AD429F784F40A34BD7703A0D25C05B4895409F784F405CD3603B3A0D25C0BCA2533D9F784F4086DE369D15ED23C061D0192DC5624F4043056D5A15ED23C0ED1A5826C5624F40A032E57F87E322C0826D51E2483F4F40DD52A05B87E322C0F7675BDC483F4F40639CB9C5C4FA21C0F105007F870F4F403BFDBEB1C4FA21C0CB9D0F7A870F4F4077F13441BF3B21C0046EC1D356D54E40C101CF35BF3B21C090E385CF56D54E400964962BCEAD20C06B969258F3924E40E2322A25CEAD20C04A65B654F3924E40113F7FEA655620C0917E6C2DEA4A4E40B6E783E7655620C029C2AB29EA4A4E40CDF71C64E23820C05033F10000004E40'::geography);
 }}}

 of

 {{{
 174586245121.787
 }}}

 pramsey before I close this out as expected change, can you confirm that
 this change in _ST_BestSRID is intentional?

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2635#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list