<div dir="ltr">Sorry I'm not trying to offend you.<div><br></div><div>For example in this thread </div><div><a href="https://groups.google.com/forum/#!topic/postgis-users/9pozIoUAZuI">https://groups.google.com/forum/#!topic/postgis-users/9pozIoUAZuI</a><br>
</div><div>The asker posted an image to explain better.</div><div><br></div><div>Cheers,</div><div>Rémi-C</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/12 <span dir="ltr"><<a href="mailto:islanis@infomed.sld.cu" target="_blank">islanis@infomed.sld.cu</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">no is not dificult to understand, what ever you want i'll give , just ask what do you want to a better understanding. please i need it<br>
<br>
"Rémi Cura" <<a href="mailto:remi.cura@gmail.com" target="_blank">remi.cura@gmail.com</a>> escribió:<div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm very sorry it is difficult to understand what you mean.<br>
Maybe with a real drawing and link here to it, or to some screenshots?<br>
;-)<br>
<br>
Cheers,<br>
<br>
Rémi-C<br>
<br>
2013/12/12 <<a href="mailto:islanis@infomed.sld.cu" target="_blank">islanis@infomed.sld.cu</a>><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
thanks for the quick answer Rémi, but, thats right thats one of answers,<br>
but my idea was not complete,because there is a<br>
3rd shape, your answer works fine for the 1st and 2dn shapes, but not with<br>
the 3rd, because the 3rd has not suares inside,<br>
the 3rd shape have big triangles inside,the idea is that i need some<br>
routine that merge or blend the spatial data and with it the attributes<br>
of respective data, i need some ideas for do that, and am working on it,<br>
but not sucess, please i need help, thanks for all.<br>
<br>
<br>
1-the first shapefile<br>
__________________<br>
| |<br>
| |<br>
| 1 | shp=A<br>
| |<br>
| |<br>
|_________________|<br>
num of poligons=1<br>
<br>
<br>
The one big country, this is a multipolygon shape<br>
<br>
DATA=>dni01 numeric,dni02 numeric,dni03 numeric,<br>
dni04 numeric,dni05 numeric,dni06 numeric,<br>
dni07 numeric,dni08 numeric,dni09 numeric,<br>
dni10 numeric,dni11 numeric,dni12 numeric,<br>
dniann numeric,the_geom geometry<br>
<br>
2-and the second shapefile<br>
__________________<br>
| 2 | 2 |<br>
|________|________|<br>
| 2 | 2 | shp=B<br>
|________|________|<br>
| 2 | 2 |<br>
|________|________|<br>
num of poligons = 6<br>
<br>
The same country, but this time in little pieces, the states, this is a<br>
multipolygon shape too<br>
<br>
DATA=>dni01 numeric,dni02 numeric,dni03 numeric,<br>
dni04 numeric,dni05 numeric,dni06 numeric,<br>
dni07 numeric,dni08 numeric,dni09 numeric,<br>
dni10 numeric,dni11 numeric,dni12 numeric,<br>
dniann numeric,the_geom geometry<br>
<br>
<br>
3-and the second shapefile<br>
__________________<br>
| / |<br>
| / |<br>
| 3 / | shp=C<br>
| / |<br>
| / 4 |<br>
|_____/___________|<br>
num of poligons = 2<br>
<br>
The same country, but this time in little pieces, the states, this is a<br>
multipolygon shape too<br>
<br>
DATA=>dni01 numeric,dni02 numeric,dni03 numeric,<br>
dni04 numeric,dni05 numeric,dni06 numeric,<br>
dni07 numeric,dni08 numeric,dni09 numeric,<br>
dni10 numeric,dni11 numeric,dni12 numeric,<br>
dniann numeric,the_geom geometry<br>
<br>
<br>
<br>
and i want join the 2 shapes in only one shapefile getting something like<br>
this<br>
<br>
______________________________<br>
| | / |<br>
| |1,2,3 / |<br>
| 1,2,3 | /1,2,4 |<br>
| | / |<br>
|______________|____/_________<u></u>|<br>
| |1,2/ | shp=A and B<br>
| |,3/ |<br>
| 1,2,3 | / 1,2,4 |<br>
| |/ |<br>
|______________/______________<u></u>|<br>
| /| |<br>
| / | |<br>
| 1,2,3 /1,| 1,2,4 |<br>
| /2,4| |<br>
|_________/____|______________<u></u>|<br>
num of poligons = 9<br>
<br>
<br>
DATA=>dni01A numeric,dni02A numeric,dni03A numeric,dni04A numeric,<br>
dni05A numeric,dni06A numeric,dni07A numeric,dni08A numeric,<br>
dni09A numeric,dni10A numeric,dni11A numeric,dni12A numeric,<br>
dniannA numeric,dni01B numeric,dni02B numeric,dni03B numeric,<br>
dni04B numeric,dni05B numeric,dni06B numeric,dni07B numeric,<br>
dni08B numeric,dni09B numeric,dni10B numeric,dni11B numeric,<br>
dni12B numeric,dniannB numeric,dni01C numeric,dni02C numeric,<br>
dni03C numeric,dni04C numeric,dni05C numeric,dni06C numeric,<br>
dni07C numeric,dni08C numeric,dni09C numeric,dni10C numeric,<br>
dni11C numeric,dni12C numeric,dniannC numeric,the_geom geometry<br>
<br>
"Rémi Cura" <<a href="mailto:remi.cura@gmail.com" target="_blank">remi.cura@gmail.com</a>> escribió:<br>
<br>
<br>
Seems like If you want :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
for each little square, get the id of big square overlaping.<br>
If this is simply this, you don't need the "intersection" function,<br>
but only the "intersects" function :<br>
<br>
You could do something like this<br>
<br>
SELECT <a href="http://ss.id" target="_blank">ss.id</a>, <a href="http://bs.id" target="_blank">bs.id</a> , ss.geom<br>
FROM smal_square_table AS ss, big_square_table AS bs<br>
WHERE ST_Intersects(ss.geom,bs.geom)<u></u>=TRUE<br>
<br>
Cheers,<br>
Rémi-C<br>
<br>
<br>
<br>
<br>
2013/12/12 <<a href="mailto:islanis@infomed.sld.cu" target="_blank">islanis@infomed.sld.cu</a>><br>
<br>
Hi,<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Try pg 21 of this: <a href="http://presentations.opengeo" target="_blank">http://presentations.opengeo</a>.<br>
org/2011_FOSS4G/postgis-power.<u></u>pdf<br>
<br>
That will give you the metacode.<br>
<br>
Overlays. (he sighs.) Be glad you only have 2 layers... .<br>
<br>
Best,<br>
Steve<br>
<br>
Hey steve thanks for the book is really good as a resume, but the only<br>
</blockquote>
apart that it have to do with my problem is the intersection of 2 shapes<br>
"SELECT<br>
a.*, b.*,<br>
ST_Intersection(a.geom, b.geom)<br>
FROM<br>
a, b<br>
WHERE<br>
ST_Intersects(a.geom, b.geom);"<br>
<br>
but my problem is different, i got as a mention 2 shapes with the same<br>
projection and place,<br>
and are the same but one is from one study, and the other is from other<br>
stufy, but are the same<br>
place and each one have data, the only things that they got different are<br>
the size of the squares,the data they got and the<br>
name of the columns are the same, but the values are different cause the<br>
type of the study<br>
,there is one that have the squares more smaller that the other, but i<br>
dont want lose any data, i need that in the map it has seen like<br>
the figure "A and B" but in the data each row got the values of A and<br>
the<br>
values of B<br>
<br>
1-the first shapefile<br>
__________________<br>
| |<br>
| |<br>
| 1 | shp=A<br>
| |<br>
| |<br>
|_________________|<br>
<br>
The one big country, this is a multipolygon shape<br>
<br>
DATA=>dni01 numeric,dni02 numeric,dni03 numeric,<br>
dni04 numeric,dni05 numeric,dni06 numeric,<br>
dni07 numeric,dni08 numeric,dni09 numeric,<br>
dni10 numeric,dni11 numeric,dni12 numeric,<br>
dniann numeric,the_geom geometry<br>
<br>
<br>
2-and the second shapefile<br>
__________________<br>
| 2 | 2 |<br>
|________|________|<br>
| 2 | 2 | shp=B<br>
|________|________|<br>
| 2 | 2 |<br>
|________|________|<br>
The same country, but this time in little pieces, the states, this is a<br>
multipolygon shape too<br>
<br>
DATA=>dni01 numeric,dni02 numeric,dni03 numeric,<br>
dni04 numeric,dni05 numeric,dni06 numeric,<br>
dni07 numeric,dni08 numeric,dni09 numeric,<br>
dni10 numeric,dni11 numeric,dni12 numeric,<br>
dniann numeric,the_geom geometry<br>
<br>
<br>
and i want join the 2 shapes in only one shapefile getting something<br>
like<br>
this<br>
<br>
__________________<br>
| 1,2 | 1,2 |<br>
|________|________|<br>
| 1,2 | 1,2 | shp=A and B<br>
|________|________|<br>
| 1,2 | 1,2 |<br>
|________|________|<br>
<br>
DATA=>dni01A numeric,dni02A numeric,dni03A numeric,dni04A numeric,<br>
dni05A numeric,dni06A numeric,dni07A numeric,dni08A numeric,<br>
dni09A numeric,dni10A numeric,dni11A numeric,dni12A numeric,<br>
dniannA numeric,dni01B numeric,dni02B numeric,dni03B numeric,<br>
dni04B numeric,dni05B numeric,dni06B numeric,dni07B numeric,<br>
dni08B numeric,dni09B numeric,dni10B numeric,dni11B numeric,<br>
dni12B numeric,dniannB numeric,the_geom geometry<br>
<br>
i think that this is posible to do with postgis, but i dont know why, am<br>
looking in quantumGIS but i lose data cause the big suare overlap the<br>
little<br>
ones and i lose data cause there is some places that i get NULL.<br>
<br>
please help<br>
thanks for all<br>
<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<br>
On Mon, Dec 9, 2013 at 11:03 AM, J.Alejandro Martinez Linares <<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<a href="mailto:islanis@infomed.sld.cu" target="_blank">islanis@infomed.sld.cu</a>> wrote:<br>
<br>
Hi People, i need your help, let say that i have 2 shapefiles<br>
<br>
1-the first shapefile<br>
__________________<br>
| |<br>
| |<br>
| 1 | shp=B<br>
| |<br>
| |<br>
|_________________|<br>
<br>
One big country, this is a multipolygon shape<br>
<br>
2-and the second shapefile<br>
__________________<br>
| 2 | 2 |<br>
|________|________|<br>
| 2 | 2 | shp=B<br>
|________|________|<br>
| 2 | 2 |<br>
|________|________|<br>
The same country, but this time in little pieces, the states, this<br>
is<br>
a multipolygon shape too<br>
<br>
and i want join the 2 shapes in only one shapefile getting something<br>
like this<br>
<br>
__________________<br>
| 1,2 | 1,2 |<br>
|________|________|<br>
| 1,2 | 1,2 | shp=A and B<br>
|________|________|<br>
| 1,2 | 1,2 |<br>
|________|________|<br>
<br>
i think that this is posible, please help me to get somthing like<br>
this i need it.<br>
<br>
<br>
<br>
--<br>
<br>
Este mensaje le ha llegado mediante el servicio de correo<br>
electronico<br>
que ofrece Infomed para respaldar el cumplimiento de las misiones del<br>
Sistema Nacional de Salud. La persona que envia este correo asume el<br>
compromiso de usar el servicio a tales fines y cumplir con las<br>
regulaciones<br>
establecidas<br>
<br>
Infomed: <a href="http://www.sld.cu/" target="_blank">http://www.sld.cu/</a><br>
<br>
______________________________<u></u>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-<u></u>bin/mailman/listinfo/postgis-<u></u>users</a><br>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
<br>
<br>
------------------------------<u></u>------------------------------<u></u>----<br>
This message was sent using IMP, the Internet Messaging Program.<br>
<br>
<br>
<br>
--<br>
<br>
Este mensaje le ha llegado mediante el servicio de correo electronico que<br>
ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema<br>
Nacional de Salud. La persona que envia este correo asume el compromiso<br>
de<br>
usar el servicio a tales fines y cumplir con las regulaciones<br>
establecidas<br>
<br>
Infomed: <a href="http://www.sld.cu/" target="_blank">http://www.sld.cu/</a><br>
<br>
______________________________<u></u>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-<u></u>bin/mailman/listinfo/postgis-<u></u>users</a><br>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
<br>
------------------------------<u></u>------------------------------<u></u>----<br>
This message was sent using IMP, the Internet Messaging Program.<br>
<br>
<br>
<br>
--<br>
<br>
Este mensaje le ha llegado mediante el servicio de correo electronico que<br>
ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema<br>
Nacional de Salud. La persona que envia este correo asume el compromiso de<br>
usar el servicio a tales fines y cumplir con las regulaciones establecidas<br>
<br>
Infomed: <a href="http://www.sld.cu/" target="_blank">http://www.sld.cu/</a><br>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
<br>
<br>
------------------------------<u></u>------------------------------<u></u>----<br>
This message was sent using IMP, the Internet Messaging Program.<br>
<br>
<br>
<br>
--<br>
<br>
Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas<br>
<br>
Infomed: <a href="http://www.sld.cu/" target="_blank">http://www.sld.cu/</a><br>
<br>
</div></div></blockquote></div><br></div>