Hi, Konstantinos,

I’d recommend asking your question on the postgis-specific mailing list:

https://lists.osgeo.org/mailman/listinfo/postgis-users

You’re likely to get a better response there.

This list is for discussion “about the Open Source Geospatial Foundation 
(OSGeo) in general”.

— Andy

On Feb 9, 2017, at 1:59 AM, Karamanlis Konstantinos 
<[email protected]<mailto:[email protected]>> wrote:


Hi to eveyrone,

my name is Konstantinos and I am new both in the mailing list and postgis. My 
field is electrical engineering and currently  I m working on modelling of 
power networks. A sugnificant part of my work deals with spatial data. I have a 
question concerning an issue (explain it below) and would like to ask for your 
opinion.  The processing is done in 2 database from which I extract the 
following part of grids:

<pepe.jpg>


Both pictures illustrate the same object. The blue  is considered to be the 
valid one, while the green contains missing data. Therefore my aim is to 
compare the geometries of the lines of both grids and find similarities. For 
example the lines of the third image can be considers as identical and hence 
tha blue data can be copyed to the green. To mention that both databases have 
column with the geometries of the lines. I am running the following:


create index geom_1_idx ON table1 USING GIST (geometry_1);
select table1_id, table2_id  from table1 t1, table2 t2
              where (select st_DWithin(t1.geometry_2 , t2.geometry_2, 
units_of_srid) = true)

 I used spatial indexing according to your guidelines 
(http://revenant.ca/www/postgis/workshop/indexing.html). As far I have 
understood by this code, I compare the bounding boxes of the lines and if the 
distance between the boxes is not higher than "units_of_srid", then the two 
geometries are considered identical.

My first question is if it s right what I wrote. How can I improve this in 
order not to miss "identical" lines?

Thank you in advance and for your understanding.
Looking forward for your comments and corrections.

Kind regards,

Konstantinos



_______________________________________________
Discuss mailing list
[email protected]<mailto:[email protected]>
https://lists.osgeo.org/mailman/listinfo/discuss

_______________________________________________
Discuss mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/discuss

Reply via email to