Opened 12 years ago

Last modified 12 years ago

#2006 closed defect

st_area returns NaN — at Initial Version

Reported by: evberghe Owned by: pramsey
Priority: medium Milestone: PostGIS 2.0.2
Component: postgis Version: 1.5.X
Keywords: geography Cc:

Description

The following statement returns a NaN for one of the polygons in my table (the one going round the Antarctic):

select st_area(geom::geography)/106 from hexgrid1;

output of st_astext for the offending geom is

MULTIPOLYGON(((-180 -88.4923488723258,-180 -90,180 -90,180 -88.4923488723258,162.118373 -88.171111,149.065274 -86.934953,143.650482 -85.628588,140.735071 -84.296646,138.904131 -82.949353,137.621854 -81.588793,136.636021 -80.213815,135.80367 -78.821101,135.024934 -77.405011,130.614732 -76.788369,126.617235 -76.10412,123.007648 -75.362082,119.754016 -74.570872,116.821712 -73.737902,114.176337 -72.869454,111.785425 -71.970806,109.619294 -71.046369,107.651354 -70.099821,105.858101 -69.134226,104.218929 -68.15214,102.71586 -67.155693,101.33325 -66.14667,100.057503 -65.126564,98.876793 -64.09663,97.780829 -63.057924,95.269777 -62.928846,92.784259 -62.755583,90.330873 -62.53894,87.915631 -62.279883,85.543889 -61.979524,83.220291 -61.639094,80.948747 -61.259921,78.73243 -60.843404,76.573798 -60.390995,74.474625 -59.904172,72.436054 -59.384424,70.458654 -58.833232,68.542479 -58.252054,66.687139 -57.642314,64.891861 -57.005391,63.155551 -56.342614,60.689007 -56.770884,58.224295 -57.16813,55.747207 -57.526964,53.250484 -57.842369,50.731408 -58.110721,48.190396 -58.329286,45.630125 -58.495949,43.054941 -58.609076,40.465984 -58.63646,37.870999 -58.609778,35.275127 -58.530124,32.682206 -58.399161,30.09412 -58.219304,27.50986 -57.994024,24.924061 -57.728423,22.324536 -57.430319,20.658302 -58.179398,18.924185 -58.904744,17.119621 -59.604908,15.242268 -60.27835,13.290081 -60.923436,11.261404 -61.538451,9.15508 -62.1216,6.970555 -62.671026,4.708 -63.184822,2.368426 -63.661056,-0.046198 -64.097787,-2.532853 -64.493106,-5.087385 -64.84516,-7.704457 -65.15219,-10.377546 -65.412574,-13.098976 -65.624861,-14.118509 -66.695816,-15.230334 -67.759689,-16.447764 -68.815497,-17.786591 -69.862034,-19.265623 -70.897816,-20.907348 -71.921007,-22.738728 -72.929325,-24.792135 -73.919922,-27.10642 -74.889224,-29.728014 -75.832727,-32.711907 -76.74474,-36.122086 -77.618066,-40.030693 -78.443626,-44.514624 -79.210078,-49.647612 -79.903494,-55.485512 -80.507309,-56.821032 -81.917838,-58.460449 -83.302906,-60.747466 -84.666001,-64.420025 -86.00515,-71.55536 -87.304963,-90.525593 -88.486268,-151.608241 -89.002398,-180 -88.4923488723258)))

PostGIS Version: 1.5 USE_GEOS=1 USE_PROJ=1 USE_STATS=1 PostgreSQL version: PostgreSQL 8.4.13 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.4.real (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3, 64-bit

Any attention to this is much appreciated, as is, in fact the whole of PostgreSQL/PostGIS.

Change History (0)

Note: See TracTickets for help on using tickets.