<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16434"></HEAD>
<BODY><FONT color=#0000ff size=2 face=Arial></FONT>
<DIV dir=ltr align=left><SPAN class=390321305-07092011><FONT color=#0000ff
size=2 face=Arial> Sarah, </FONT></SPAN><BR><SPAN
class=390321305-07092011><FONT color=#0000ff size=2 face=Arial> >
</FONT></SPAN>I'm having trouble making convex hulls that cross the
international dateline. Imagine 4 points making a square with the international
dateline running down the middle--I would like the convex hull to be that
square, but instead I get a giant rectangle that goes across the entire planet.
I've done some reading, and it sounds like GEOS generally has a hard time
dealing with the dateline--is that accurate?<SPAN class=390321305-07092011><FONT
color=#0000ff size=2 face=Arial> </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=390321305-07092011><FONT color=#0000ff
size=2 face=Arial>Yes GEOS only deals with planar coordinates.
Geography is the only geodetic aware type and there is no ConvexHull function
for it.</FONT></SPAN><SPAN class=390321305-07092011><FONT color=#0000ff size=2
face=Arial></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=390321305-07092011><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=390321305-07092011> >
</SPAN> Does anyone know of a way to get around this? I was thinking that
it might work if I use an SRID that is just like 4326 but with a central
meridian of 180, does that sound like a good plan?<SPAN
class=390321305-07092011><FONT color=#0000ff size=2
face=Arial> </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=390321305-07092011><FONT color=#0000ff
size=2 face=Arial>No. You should use a planar projection of some
sort. 4326 squashed on a map is no good. Paul Ramsey might have some
thoughts on the matter. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=390321305-07092011><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN><SPAN class=390321305-07092011><FONT
color=#0000ff size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=390321305-07092011>> </SPAN>
I'm pretty new to postGIS and I'm not sure how to either find such an SRID or
how to define it--I've been trying to find an explanation of SRID syntax and so
far coming up empty. If anyone has advice for solving this problem, or for
places where I can learn more about defining custom SRIDs, I'd be really
grateful!<SPAN class=390321305-07092011><FONT color=#0000ff size=2
face=Arial> </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=390321305-07092011></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=390321305-07092011><FONT color=#0000ff
size=2 face=Arial>You might want to check out <A
href="http://spatialreference.org">http://spatialreference.org</A></FONT> </SPAN><BR><BR><SPAN
class=390321305-07092011><FONT color=#0000ff size=2 face=Arial> <FONT
color=#000000 size=3 face="Times New Roman">>
</FONT> </FONT></SPAN>Here's an example--if you make this table and then
look at it in QGIS (or whatever) along with a world map, you'll see a big
rectangle spanning the entire map. On a map with <SPAN
class=390321305-07092011><FONT color=#0000ff size=2
face=Arial> </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=390321305-07092011><FONT color=#0000ff
size=2 face=Arial>> </FONT></SPAN>central meridian of zero, I'd want to
see half the polygon on the left side of the map and the other half on the right
side.<BR><BR><SPAN class=390321305-07092011><FONT color=#0000ff size=2
face=Arial> <FONT color=#000000 size=3 face="Times New Roman">>
</FONT> </FONT></SPAN>CREATE TABLE example AS<BR><SPAN
class=390321305-07092011><FONT color=#0000ff size=2 face=Arial> <FONT
color=#000000 size=3 face="Times New Roman">>
</FONT> </FONT></SPAN>SELECT ST_ConvexHull(<BR> <SPAN
class=390321305-07092011><FONT color=#0000ff size=2
face=Arial> > </FONT></SPAN>
ST_Collect(ST_GeomFromText('MULTIPOINT(175 5, 175 30, -175 5, -175 30)')
))::geography(Polygon, 4326) ;<BR><SPAN class=390321305-07092011><FONT
color=#0000ff size=2 face=Arial> </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=390321305-07092011><FONT color=#0000ff
size=2 face=Arial>My guess is you'll have to cut your area into pieces.
Still then its not that pretty when you try to
rejoin.</FONT> </SPAN><BR><BR><SPAN class=390321305-07092011><FONT
color=#0000ff size=2 face=Arial>Sorry couldn't be more help,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=390321305-07092011><FONT color=#0000ff
size=2 face=Arial>Regina</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=390321305-07092011><FONT color=#0000ff
size=2 face=Arial><A
href="http://www.postgis.us">http://www.postgis.us</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN
class=390321305-07092011> </SPAN></DIV></BODY></HTML>