<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html style="direction: ltr;">
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body style="direction: ltr;" bidimailui-charset-is-forced="true"
bidimailui-detected-decoding-type="latin-charset" text="#000000"
bgcolor="#ffffff">
<p style="margin-bottom: 0cm; margin-top: 0pt;">On 13/06/2011 18:30,
Evgenia Gurova wrote:<br>
</p>
<blockquote cite="mid:4DF62D24.5060701@gmail.com" type="cite">Hello
<br>
<br>
I am not new in GIS, but absolutely new PosgreSQL/PostGIS.. I feel
it's a easy typical situation, but dont know how to deal with it..
<br>
<br>
I have points of measurements in point PostGIS layer. It is a
systematic grid of points. Each point have a point_ID, generated
as "latlon" from lat and lon (in decimal degrees) of each point
(for lat 54.456 and lon 21.345, point_id will be 5445621345).
<br>
<br>
</blockquote>
<br>
Hmmm, are you *sure* no points are close enough to have the same
point_id?? Three decimal places in Lon/Lat is about 100 meters. If
two points are that close, will they get the same id?<br>
<br>
<blockquote cite="mid:4DF62D24.5060701@gmail.com" type="cite">And I
have a table with many measurements for every point.
<br>
Columns are year, JD (julian day), hour, point_ID, wdir, wspeed.
<br>
<br>
The idea was to avoid duplicating of data, so i can store the
points in a simple small geo-table, and store all the measurements
in a separate table and to link them to be able to see the exact
measurement (according to required year/jd/hour) attributes for
the required points. So, I can open QGIS, open the points
according to some criteria (lat/lon selection...), and then to
see/visualize the measured values of specific some day/time,
obtained from the measurements table.
<br>
<br>
Do i need to do it by creating a view? and how to do it to get it
as geo-layer in QGIS?
<br>
</blockquote>
<br>
Yes exactly. (Assuming your points table is already a PostGIS
geometry layer with the proper 'geom' column). It should be
something like: <br>
CREATE VIEW point_measurements AS SELECT p.geom,
m.year,m.jd,m.hour,m.wdir,m.wspeed FROM points AS p JOIN
measurements AS m ON p.point_id=m.point_id ;<br>
The resulting view "point_measurements" should be visible in QGIS as
a spatial layer with attributes.<br>
<br>
<blockquote cite="mid:4DF62D24.5060701@gmail.com" type="cite">Or it
should be done by foreign key? If so - how it should look like?
And how to get the attributes in QGIS?
<br>
<br>
I tried to find an answer on the web - but..well, it takes too
much time for such an easy task :(
<br>
May be it could be easier to create a point for every measurement?
But it seems quite strange for me...and not correct way.
<br>
<br>
Thank you very much
<br>
Evgenia
<br>
_______________________________________________
<br>
postgis-users mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<br>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
<br>
<br>
This mail was received via Mail-SeCure System.
<br>
<br>
<br>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<div class="moz-signature">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<title></title>
<p style="margin-bottom: 0cm; margin-top: 0pt; float: right;"><img
alt="Hevra Logo"
src="cid:part1.08070703.04080006@arava.co.il" width="135"
border="0" height="59"></p>
<p style="margin-bottom: 0cm; margin-top: 0pt; direction: ltr;">Micha
Silver</p>
<p style="margin-bottom: 0cm; margin-top: 0pt; direction: ltr;">Arava
Development Co</p>
<p style="margin-bottom: 0cm; margin-top: 0pt; direction: ltr;">052-3665918</p>
<p style="margin-bottom: 0cm; margin-top: 0pt; direction: ltr;"><a class="moz-txt-link-freetext" href="http://www.surfaces.co.il">http://www.surfaces.co.il</a></p>
</div>
</div>
</body>
</html>