[postgis-users] ERROR: BOOM! Could not generate outside point!

Rémi Cura remi.cura at gmail.com
Wed Oct 16 00:24:53 PDT 2013


Hey,
just a quick note :
changing you intersection zone definition to use a srid:
to
ST_Intersects( ST_GeographyFromtext('SRID=4326;polygon((1.0 1.0,  1.0 2.0,
 2.0 2.0,  2.0 1.0,  1.0 1.0))')

It doesn't break and return TRUE.

I'm using 2.1 so it may be because of that.

Cheers
Rémi-C


2013/10/16 Hartranft, Robert M. (GSFC-423.0)[RAYTHEON COMPANY] <
robert.m.hartranft at nasa.gov>

>  Hi All,
>
>  I am using postresql version 9.2.4 and postgis version 2.0
>
>  I am trying to use the multipolygon to simulate a spatial
> object that follows lines of constant latitude instead of
> using great circle arcs, and allows arc greater than 180
> degrees.
>
>  For example, given the following polygon
> (assuming points in a clockwise order covering 270 degrees of longitude):
>
>  polygon((-180 -89.99,  -180 89.9,  90, 89.9 90, -89.9, -180 -89.99))
>
>  I break it up into multiple polygons each covering 45 degrees of
> longitude
> and adding points every 1 degree to try to simulate constant latitude.
> However I get an error from postgis complaining it can't determine a point
> outside the
> multipolygon.
>
>  Here is the sql...
>
>  select 1 where ST_Intersects( 'polygon((1.0 1.0,  1.0 2.0,  2.0 2.0,
>  2.0 1.0,  1.0 1.0))'::geography,
> ST_GeographyFromText('SRID=4326;multipolygon(
>
>  ((-180 -89.99, -179 -89.99, -178 -89.99, -177 -89.99, -176 -89.99, -175
> -89.99, -174 -89.99, -173 -89.99, -172 -89.99, -171 -89.99, -170 -89.99,
> -169 -89.99, -168 -89.99, -167 -89.99, -166 -89.99, -165 -89.99, -164
> -89.99, -163 -89.99, -162 -89.99, -161 -89.99, -160 -89.99, -159 -89.99,
> -158 -89.99, -157 -89.99, -156 -89.99, -155 -89.99, -154 -89.99, -153
> -89.99, -152 -89.99, -151 -89.99, -150 -89.99, -149 -89.99, -148 -89.99,
> -147 -89.99, -146 -89.99, -145 -89.99, -144 -89.99, -143 -89.99, -142
> -89.99, -141 -89.99, -140 -89.99, -139 -89.99, -138 -89.99, -137 -89.99,
> -136 -89.99, -135 -89.99, -135 89.99, -136 89.99, -137 89.99, -138 89.99,
> -139 89.99, -140 89.99, -141 89.99, -142 89.99, -143 89.99, -144 89.99,
> -145 89.99, -146 89.99, -147 89.99, -148 89.99, -149 89.99, -150 89.99,
> -151 89.99, -152 89.99, -153 89.99, -154 89.99, -155 89.99, -156 89.99,
> -157 89.99, -158 89.99, -159 89.99, -160 89.99, -161 89.99, -162 89.99,
> -163 89.99, -164 89.99, -165 89.99, -166 89.99, -167 89.99, -168 89.99,
> -169 89.99, -170 89.99, -171 89.99, -172 89.99, -173 89.99, -174 89.99,
> -175 89.99, -176 89.99, -177 89.99, -178 89.99, -179 89.99, -180 89.99,
> -180 -89.99)),
>
>  ((-135 -89.99, -134 -89.99, -133 -89.99, -132 -89.99, -131 -89.99, -130
> -89.99, -129 -89.99, -128 -89.99, -127 -89.99, -126 -89.99, -125 -89.99,
> -124 -89.99, -123 -89.99, -122 -89.99, -121 -89.99, -120 -89.99, -119
> -89.99, -118 -89.99, -117 -89.99, -116 -89.99, -115 -89.99, -114 -89.99,
> -113 -89.99, -112 -89.99, -111 -89.99, -110 -89.99, -109 -89.99, -108
> -89.99, -107 -89.99, -106 -89.99, -105 -89.99, -104 -89.99, -103 -89.99,
> -102 -89.99, -101 -89.99, -100 -89.99, -99 -89.99, -98 -89.99, -97 -89.99,
> -96 -89.99, -95 -89.99, -94 -89.99, -93 -89.99, -92 -89.99, -91 -89.99, -90
> -89.99, -90 89.99, -91 89.99, -92 89.99, -93 89.99, -94 89.99, -95 89.99,
> -96 89.99, -97 89.99, -98 89.99, -99 89.99, -100 89.99, -101 89.99, -102
> 89.99, -103 89.99, -104 89.99, -105 89.99, -106 89.99, -107 89.99, -108
> 89.99, -109 89.99, -110 89.99, -111 89.99, -112 89.99, -113 89.99, -114
> 89.99, -115 89.99, -116 89.99, -117 89.99, -118 89.99, -119 89.99, -120
> 89.99, -121 89.99, -122 89.99, -123 89.99, -124 89.99, -125 89.99, -126
> 89.99, -127 89.99, -128 89.99, -129 89.99, -130 89.99, -131 89.99, -132
> 89.99, -133 89.99, -134 89.99, -135 89.99, -135 -89.99)),
>
>  ((-90 -89.99, -89 -89.99, -88 -89.99, -87 -89.99, -86 -89.99, -85
> -89.99, -84 -89.99, -83 -89.99, -82 -89.99, -81 -89.99, -80 -89.99, -79
> -89.99, -78 -89.99, -77 -89.99, -76 -89.99, -75 -89.99, -74 -89.99, -73
> -89.99, -72 -89.99, -71 -89.99, -70 -89.99, -69 -89.99, -68 -89.99, -67
> -89.99, -66 -89.99, -65 -89.99, -64 -89.99, -63 -89.99, -62 -89.99, -61
> -89.99, -60 -89.99, -59 -89.99, -58 -89.99, -57 -89.99, -56 -89.99, -55
> -89.99, -54 -89.99, -53 -89.99, -52 -89.99, -51 -89.99, -50 -89.99, -49
> -89.99, -48 -89.99, -47 -89.99, -46 -89.99, -45 -89.99, -45 89.99, -46
> 89.99, -47 89.99, -48 89.99, -49 89.99, -50 89.99, -51 89.99, -52 89.99,
> -53 89.99, -54 89.99, -55 89.99, -56 89.99, -57 89.99, -58 89.99, -59
> 89.99, -60 89.99, -61 89.99, -62 89.99, -63 89.99, -64 89.99, -65 89.99,
> -66 89.99, -67 89.99, -68 89.99, -69 89.99, -70 89.99, -71 89.99, -72
> 89.99, -73 89.99, -74 89.99, -75 89.99, -76 89.99, -77 89.99, -78 89.99,
> -79 89.99, -80 89.99, -81 89.99, -82 89.99, -83 89.99, -84 89.99, -85
> 89.99, -86 89.99, -87 89.99, -88 89.99, -89 89.99, -90 89.99, -90 -89.99)),
>
>  ((-45 -89.99, -44 -89.99, -43 -89.99, -42 -89.99, -41 -89.99, -40
> -89.99, -39 -89.99, -38 -89.99, -37 -89.99, -36 -89.99, -35 -89.99, -34
> -89.99, -33 -89.99, -32 -89.99, -31 -89.99, -30 -89.99, -29 -89.99, -28
> -89.99, -27 -89.99, -26 -89.99, -25 -89.99, -24 -89.99, -23 -89.99, -22
> -89.99, -21 -89.99, -20 -89.99, -19 -89.99, -18 -89.99, -17 -89.99, -16
> -89.99, -15 -89.99, -14 -89.99, -13 -89.99, -12 -89.99, -11 -89.99, -10
> -89.99, -9 -89.99, -8 -89.99, -7 -89.99, -6 -89.99, -5 -89.99, -4 -89.99,
> -3 -89.99, -2 -89.99, -1 -89.99, 0 -89.99, 0 89.99, -1 89.99, -2 89.99, -3
> 89.99, -4 89.99, -5 89.99, -6 89.99, -7 89.99, -8 89.99, -9 89.99, -10
> 89.99, -11 89.99, -12 89.99, -13 89.99, -14 89.99, -15 89.99, -16 89.99,
> -17 89.99, -18 89.99, -19 89.99, -20 89.99, -21 89.99, -22 89.99, -23
> 89.99, -24 89.99, -25 89.99, -26 89.99, -27 89.99, -28 89.99, -29 89.99,
> -30 89.99, -31 89.99, -32 89.99, -33 89.99, -34 89.99, -35 89.99, -36
> 89.99, -37 89.99, -38 89.99, -39 89.99, -40 89.99, -41 89.99, -42 89.99,
> -43 89.99, -44 89.99, -45 89.99, -45 -89.99)),
>
>  ((0 -89.99, 1 -89.99, 2 -89.99, 3 -89.99, 4 -89.99, 5 -89.99, 6 -89.99,
> 7 -89.99, 8 -89.99, 9 -89.99, 10 -89.99, 11 -89.99, 12 -89.99, 13 -89.99,
> 14 -89.99, 15 -89.99, 16 -89.99, 17 -89.99, 18 -89.99, 19 -89.99, 20
> -89.99, 21 -89.99, 22 -89.99, 23 -89.99, 24 -89.99, 25 -89.99, 26 -89.99,
> 27 -89.99, 28 -89.99, 29 -89.99, 30 -89.99, 31 -89.99, 32 -89.99, 33
> -89.99, 34 -89.99, 35 -89.99, 36 -89.99, 37 -89.99, 38 -89.99, 39 -89.99,
> 40 -89.99, 41 -89.99, 42 -89.99, 43 -89.99, 44 -89.99, 45 -89.99, 45 89.99,
> 44 89.99, 43 89.99, 42 89.99, 41 89.99, 40 89.99, 39 89.99, 38 89.99, 37
> 89.99, 36 89.99, 35 89.99, 34 89.99, 33 89.99, 32 89.99, 31 89.99, 30
> 89.99, 29 89.99, 28 89.99, 27 89.99, 26 89.99, 25 89.99, 24 89.99, 23
> 89.99, 22 89.99, 21 89.99, 20 89.99, 19 89.99, 18 89.99, 17 89.99, 16
> 89.99, 15 89.99, 14 89.99, 13 89.99, 12 89.99, 11 89.99, 10 89.99, 9 89.99,
> 8 89.99, 7 89.99, 6 89.99, 5 89.99, 4 89.99, 3 89.99, 2 89.99, 1 89.99, 0
> 89.99, 0 -89.99)),
>
>  ((45 -89.99, 46 -89.99, 47 -89.99, 48 -89.99, 49 -89.99, 50 -89.99, 51
> -89.99, 52 -89.99, 53 -89.99, 54 -89.99, 55 -89.99, 56 -89.99, 57 -89.99,
> 58 -89.99, 59 -89.99, 60 -89.99, 61 -89.99, 62 -89.99, 63 -89.99, 64
> -89.99, 65 -89.99, 66 -89.99, 67 -89.99, 68 -89.99, 69 -89.99, 70 -89.99,
> 71 -89.99, 72 -89.99, 73 -89.99, 74 -89.99, 75 -89.99, 76 -89.99, 77
> -89.99, 78 -89.99, 79 -89.99, 80 -89.99, 81 -89.99, 82 -89.99, 83 -89.99,
> 84 -89.99, 85 -89.99, 86 -89.99, 87 -89.99, 88 -89.99, 89 -89.99, 90
> -89.99, 90 89.99, 89 89.99, 88 89.99, 87 89.99, 86 89.99, 85 89.99, 84
> 89.99, 83 89.99, 82 89.99, 81 89.99, 80 89.99, 79 89.99, 78 89.99, 77
> 89.99, 76 89.99, 75 89.99, 74 89.99, 73 89.99, 72 89.99, 71 89.99, 70
> 89.99, 69 89.99, 68 89.99, 67 89.99, 66 89.99, 65 89.99, 64 89.99, 63
> 89.99, 62 89.99, 61 89.99, 60 89.99, 59 89.99, 58 89.99, 57 89.99, 56
> 89.99, 55 89.99, 54 89.99, 53 89.99, 52 89.99, 51 89.99, 50 89.99, 49
> 89.99, 48 89.99, 47 89.99, 46 89.99, 45 89.99, 45 -89.99))
> )'));
> ERROR:  BOOM! Could not generate outside point!
> CONTEXT:  SQL function "st_intersects" statement 1
>
>  The problem also happens if the spatial object is stored in a table
> and I try to query it.  The above example is just the easiest way to
> reproduce the issue.
>
>  I would be thankful for any help in solving this issue.
>
>
>  Bob
>  -----------------------------------------------------------------
> Robert Hartranft
> Mission Operations and Services
> Intelligence & Information System
> Raytheon Company
> 301-851-8197
> robert_m_hartranft at raytheon.com
> robert.m.hartranft at nasa.gov
> 5700 Rivertech Court
> Riverdale, MD 20737
> -----------------------------------------------------------------
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20131016/7c4b22ca/attachment.html>


More information about the postgis-users mailing list