<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: [postgis-users] [postgis-devel] Dropped DM (Time) dimensionwith intersections</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Margie,<BR>
<BR>
This may be a dumb question on my part, but why can't you keep track of time separate from space with a datetime field and then use the numerous functions in postgresql for doing datetime overlap comparisons combined with spatial overlaps.<BR>
<BR>
Thanks,<BR>
Regina<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: postgis-users-bounces@postgis.refractions.net on behalf of Margie Huntington<BR>
Sent: Mon 10/13/2008 2:08 PM<BR>
To: postgis-users@postgis.refractions.net<BR>
Subject: Re: [postgis-users] [postgis-devel] Dropped DM (Time) dimensionwith intersections<BR>
<BR>
<BR>
I think there is a miscommunication.  I'm attempting to model moving objects<BR>
in the database; specifically aircraft.  These aircraft have both an<BR>
altitude and time as well as the normal x- and y- components.  The problem<BR>
is, I haven't found a function that will return time, the m-component. (I<BR>
can determine altitude myself since the points are linear; thus, this<BR>
omission isn't as critical.)<BR>
<BR>
I'd like to determine if aircraft maintain a safe distance from each other.<BR>
I had hoped st_expand would model a moving bounding box; but it only returns<BR>
an x-, y-geometry.   The st_zmflag is 0:<BR>
<BR>
<BR>
>From my perspective, a<BR>
<BR>
    shorterSegment geometry;<BR>
    shorterSegmentBuffer geometry;<BR>
    coorddims smallint; <BR>
<BR>
           shorterSegment:= 'SRID=4326;LINESTRINGM(0 0 1.5, 10 10<BR>
2)'::geometry;     <BR>
<BR>
        shorterSegmentBuffer := st_expand(shorterSegment, exactdistance);<BR>
        coorddims := st_zmflag(shorterSegmentBuffer);    <BR>
<BR>
Same problem exists for st_intersection; only 2D geometries are returned<BR>
since the z-component is zeroed out.  The st_intersection function indicates<BR>
an intersection over the entire flight path even when the aircraft are<BR>
separated by days.  The M-component is critical since aircraft fly in the<BR>
same flight path; same x-, y- and z-components.<BR>
<BR>
There aren't plans to make the M-component operational for st_expand() nor<BR>
for st_intersection()?  I was attempting a polygon surface only because<BR>
there isn't a 3D nor 4D bounding box that works with time.<BR>
<BR>
<BR>
Paul Ramsey-3 wrote:<BR>
><BR>
> Unfortunately, there's no such thing as a 3D polygon, except for<BR>
> trivial cases (the triangle, the shape with all Z's the same).<BR>
> Everything else is unclear on how to interpret the enclosed "plane"<BR>
> (if that is what it is) formed by an irregularly elevated boundary. So<BR>
> we can store the things, but there's really no decent way to interpret<BR>
> them in generality. For that we need the real stuff, Surfaces,<BR>
> volumes, etc.<BR>
><BR>
> I think the "low hanging fruit" is probably more the "infrastructural<BR>
> requirement". We need a 4D index. That will allow us to handle things<BR>
> like 4D time tracks and point clouds efficiently, and form the<BR>
> indexing basis for future volumetric objects.<BR>
><BR>
> P.<BR>
><BR>
> On Tue, Oct 7, 2008 at 9:44 AM, Obe, Regina <robe.dnd@cityofboston.gov><BR>
> wrote:<BR>
>> I'm not sure how low hanging the fruit :), but first off would be being<BR>
>> able<BR>
>> to do intersections and indexable ST_DWithin with 3D polygons and<BR>
>> linestrings and so forth. For example when I place a cable up on a roof I<BR>
>> need to know if I'm hitting another piece of equipment.<BR>
>><BR>
>> Higher fruit - being able to support volumetric geometries.  Right now we<BR>
>> support 2d-3D polygons and lines and you can form wireframes with those,<BR>
>> but<BR>
>> no true volumetric stuff.  But then what do I know, I'm just parroting<BR>
>> things I've heard in whispers and those whispers are getting louder is<BR>
>> all<BR>
>> :)<BR>
>><BR>
>> There is still the issue of being able to display 3-D geometries without<BR>
>> spending a fortune on proprietary stuff which is not a PostGIS issue, but<BR>
>> has to gain in momentum to make PostGIS 3D more powerful (e.g. uDig for<BR>
>> 3D<BR>
>> or OpenJump for 3D or OpenLayers for 3D?)<BR>
>><BR>
>> Thanks,<BR>
>> Regina<BR>
>> ________________________________<BR>
>> From: postgis-devel-bounces@postgis.refractions.net on behalf of Paul<BR>
>> Ramsey<BR>
>> Sent: Tue 10/7/2008 12:30 PM<BR>
>> To: PostGIS Development Discussion<BR>
>> Subject: Re: [postgis-devel] Dropped DM (Time) dimension with<BR>
>> intersections<BR>
>><BR>
>> Perhaps elabourate on what better 3D support would be? There's the<BR>
>> surface object hanging around. There's the issue of maintaining higher<BR>
>> dimensional coordinates through lower dimensional transforms (which<BR>
>> you saw the result of a few days ago). There's elabourating the<BR>
>> complete set of 3D objects and relationships (gulp).<BR>
>><BR>
>> It's not clear to me what is the "low hanging fruit" that will make 3D<BR>
>> users happiest in the shortest time.<BR>
>><BR>
>> P.<BR>
>><BR>
>> On Tue, Oct 7, 2008 at 8:54 AM, Obe, Regina <robe.dnd@cityofboston.gov><BR>
>> wrote:<BR>
>>> Margie,<BR>
>>><BR>
>>> Unfortunately I think the answer is no.  Most of the work going on in<BR>
>>> 1.4<BR>
>>> is<BR>
>>> to improve speed of existing functionality and reorganize the source to<BR>
>>> make<BR>
>>> it more maintainable.<BR>
>>><BR>
>>> Someone please correct me if I am wrong.<BR>
>>><BR>
>>> I for one would be very elated if we had better 3D support since CityGML<BR>
>>> and<BR>
>>> similar initiatives are becoming more of a hot topic around here.<BR>
>>><BR>
>>> Thanks,<BR>
>>> Regina<BR>
>>> ________________________________<BR>
>>> From: postgis-devel-bounces@postgis.refractions.net<BR>
>>> [<A HREF="mailto:postgis-devel-bounces@postgis.refractions.net">mailto:postgis-devel-bounces@postgis.refractions.net</A>] On Behalf Of<BR>
>>> Huntington, Margaret (US SSA)<BR>
>>> Sent: Tuesday, October 07, 2008 11:47 AM<BR>
>>> To: postgis-devel@postgis.refractions.net<BR>
>>> Subject: [postgis-devel] Dropped DM (Time) dimension with intersections<BR>
>>><BR>
>>> Hello,<BR>
>>><BR>
>>>     Currently I'm using PostGIS 1.3.3.  From past discussions and from<BR>
>>> testing, both the st_intersection st_extend methods return 2D results<BR>
>>> with<BR>
>>> 4D input geometries.  As a temporary work-around, I had hoped<BR>
>>> st_intersection might work with 3DM geometries.  (Plan was to<BR>
>>> interpolate<BR>
>>> the altitude value within the function call if PostGIS could calculate<BR>
>>> the<BR>
>>> time dimension).   I found time components are also dropped by<BR>
>>> st_intersection with 3DM geometries.  I abandoned usage of 4D bounding<BR>
>>> boxes<BR>
>>> since these too effectively degrade 4D geometries down to 2D geometries<BR>
>>> (altitude and time are zeroed out).<BR>
>>><BR>
>>>     polyGeometry geometry;<BR>
>>><BR>
>>>     bbGeometry geometry;<BR>
>>><BR>
>>>     intersectionGeometry geometry;<BR>
>>><BR>
>>>     coorddims smallint;<BR>
>>><BR>
>>>            -- both polygon and linestring have an expected zmflag value<BR>
>>> of<BR>
>>> 1<BR>
>>><BR>
>>>            polyGeometry := 'SRID=4326;POLYGONM((0 0 0, 0 10 4, 10 10 4,<BR>
>>> 10<BR>
>>> 0<BR>
>>> 0, 0 0 0))'::geometry;<BR>
>>><BR>
>>>            bbGeometry := 'SRID=4326;LINESTRINGM(0 0 1.5, 10 10<BR>
>>> 2)'::geometry;<BR>
>>><BR>
>>>            intersectionGeometry := st_intersection(polyGeometry,<BR>
>>> bbGeometry);<BR>
>>><BR>
>>>            -- st_intersection method drops the time dimension; zmflag<BR>
>>> value<BR>
>>> of 0<BR>
>>><BR>
>>>            coorddims := st_zmflag(intersectionGeometry);<BR>
>>><BR>
>>> If I were to download the subversion snapshot, the current 1.4 version,<BR>
>>> might st_intersection work with either 3DM or 4D geometries?  Are<BR>
>>> bounding<BR>
>>> boxed or st_extend improved for either 3DM or 4D geometries?  I had<BR>
>>> incorporated polygons only as a possible work-around to the bounding box<BR>
>>> and<BR>
>>> st_extend 2D limitations.<BR>
>>><BR>
>>> Margie<BR>
>>><BR>
>>> ________________________________<BR>
>>><BR>
>>> The substance of this message, including any attachments, may be<BR>
>>> confidential, legally privileged and/or exempt from disclosure pursuant<BR>
>>> to<BR>
>>> Massachusetts law. It is intended solely for the addressee. If you<BR>
>>> received<BR>
>>> this in error, please contact the sender and delete the material from<BR>
>>> any<BR>
>>> computer.<BR>
>>><BR>
>>> ________________________________<BR>
>>><BR>
>>> Help make the earth a greener place. If at all possible resist printing<BR>
>>> this<BR>
>>> email and join us in saving paper.<BR>
>>><BR>
>>> _______________________________________________<BR>
>>> postgis-devel mailing list<BR>
>>> postgis-devel@postgis.refractions.net<BR>
>>> <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</A><BR>
>>><BR>
>>><BR>
>> _______________________________________________<BR>
>> postgis-devel mailing list<BR>
>> postgis-devel@postgis.refractions.net<BR>
>> <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</A><BR>
>><BR>
>> ________________________________<BR>
>><BR>
>> The substance of this message, including any attachments, may be<BR>
>> confidential, legally privileged and/or exempt from disclosure pursuant<BR>
>> to<BR>
>> Massachusetts law. It is intended solely for the addressee. If you<BR>
>> received<BR>
>> this in error, please contact the sender and delete the material from any<BR>
>> computer.<BR>
>><BR>
>> ________________________________<BR>
>><BR>
>> Help make the earth a greener place. If at all possible resist printing<BR>
>> this<BR>
>> email and join us in saving paper.<BR>
>><BR>
>> _______________________________________________<BR>
>> postgis-devel mailing list<BR>
>> postgis-devel@postgis.refractions.net<BR>
>> <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</A><BR>
>><BR>
>><BR>
> _______________________________________________<BR>
> postgis-users mailing list<BR>
> postgis-users@postgis.refractions.net<BR>
> <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR>
><BR>
><BR>
<BR>
--<BR>
View this message in context: <A HREF="http://www.nabble.com/Re%3A--postgis-devel--Dropped-DM-%28Time%29-dimension-with-intersections-tp19862743p19959830.html">http://www.nabble.com/Re%3A--postgis-devel--Dropped-DM-%28Time%29-dimension-with-intersections-tp19862743p19959830.html</A><BR>
Sent from the PostGIS - User mailing list archive at Nabble.com.<BR>
<BR>
_______________________________________________<BR>
postgis-users mailing list<BR>
postgis-users@postgis.refractions.net<BR>
<A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>
<HTML><BODY><P><hr size=1></P>
<P><STRONG>
The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer.
</STRONG></P></BODY></HTML>

<P><hr size=1></P>
<P><STRONG><font size="2" color="339900"> Help make the earth a greener place. If at all possible resist printing this email and join us in saving paper. </p> <p> </font></STRONG></P>