bug-gama
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gama] Feature request: Allow usage of id and time attributes in


From: Kristian Evers
Subject: Re: [Bug-gama] Feature request: Allow usage of id and time attributes in observation tags in XML files
Date: Wed, 19 Dec 2018 12:04:17 +0000

Hi Ales,

 

I’ve added address@hidden to the recipients, hopefully this mail and the previous thread arrives in the mail list archive eventually.

 

Regarding the database,  the corporate policy here is to use Oracle so that is what we do. But for this use case it doesn’t really matter as we are interfacing with the database via a purpose-made Python API (there are many reasons for this, amongst them are the flexibility to switch database and perform complicated logic not suited for the database level). I see your point in terms of interfacing directly with the database via Qt, while it is a great idea and a cool feature for gama to have, it would not be particular suitable for our use case I think. We rely on a data model that is quite different to what gama uses in the sqlite files, so we would still have to rely on outside logic to prepare data for adjustments.

 

For the time attribute it was not my intention to ascribe any inherent value to it, I would just have it there as metadata for the operator. I agree that assigning meaning to a timestamp in an adjustment poses all sorts of problems, so let’s not go down that road. We do keep an observation time for each of our observations. Exactly what it means depends on which type of observation it is (and how old it is), but in the general case we store a timestamp midway between start and end of the observation. Ultimately a time attribute is a nice-to-have for me, but it would allow a gama operator to get a quick overview of the observation they are working on. In our database we have observations going all the way back to the first half of the 19th century. While we usually use observations from the last decade or so, it happens that we use the older observations as well in which case it can help the operator decide how to proceed with the adjustment.

 

Regarding the observation id attribute, that is definitely the most important to me. At the moment we handle the problem by keeping a list of each observation with their database IDs and to/from points in the <description> section. This works but is in no way elegant. If xml-tags not required by  gama was allowed we could work around all of this in nice and clean ways. Speaking of that, what is the reason for the strict interpretation of the xml?

 

Enjoy the Christmas party,

Kristian

 

Fra: Aleš Čepek <address@hidden>
Sendt: 19. december 2018 12:10
Til: Kr
istian Evers <address@hidden>
Cc: Petra Millarova <address@hidden>
Emne: Re: [Bug-gama] Feature request: Allow usage of id and time attributes in observation tags in XML files

 

Dear Kristian, I do not see your email in bug-gama list archive (I am sure I approved it yesterday), can you send it there again please? Your suggestion needs thorough consideration, I am leaving for our department Christmas party in a moment and anyway I need some tome to think about your proposal. Meanwhile let me ask a technical detail. What database are you using? As you may know, gama can read adjustment input from sqlite3 database (and the Qt graphical interface qgama from any database supported by Qt platform. So may be there is a better option than enhancement of XML format. Actually, adding timestamps to gama-local observations is not a good idea, this might suit your specific needs but it is not general solution (talking about leveling, what the timestamp should mean? Beginig of the observations, end, mean time? And what is time in general, with my roots in geodetic astronomy I must ask, are you talking about MJD (Modified Julian Date) or about what?  By the way, several decades ago I started my professional carrier at the Leveling Section of the Czech Surveying office (one year only, my first benchmark was about 60 kilometers).  On the other hand, general ID could serve anybody (with metadata elsewhere). .... but I would like to ask all these rhetorical questions in the bug-gama list. If you were using Postresql, it would be a delight to add direct access with libpq++ library.

Aleš

 

 

On Tue, 18 Dec 2018 at 16:54, Kristian Evers <address@hidden> wrote:

Hello.

 

Here at the Danish National Mapping Agency (http://eng.sdfe.dk/) we are currently redesigning our geodetic registry that stores information on all geodetic benchmarks, and observations between them, in Denmark, Greenland and the Faroe Islands. A key component of this registry is the interface to gnu gama. We are planning on using gama for all adjustments and hence we are developing a module that can output coordinates and observations from the database to XML files that gama can read. The same module will also be able to load information to the database from an output file from gama. The basic workflow when updating heights of benchmarks goes something like:

 

1.       Select relevant coordinates and observations from the database

2.       Create gama XML file

3.       Make adjustments with gama, save output XML file

4.       Load adjusted heights from output XML file into database

 

In the last step we would like to keep a record of which observations was used to determine a given coordinate. In the database we have a table that keeps track of exactly this connection. For this we are using the database ID’s of both the coordinate and the observations since an observation isn’t uniquely determined by just the “to” and “from” benchmarks (there can be quite many observations between the same two benchmarks). This makes it somewhat difficult to create a connection between coordinates and observations based solely on the output files from gama. Therefore it would be nice if gama would allow the usage of an “id” and a “time” attribute in the observations tags (<dh>, <s-distance>, etc.) of an input XML file. These attributes would of course only be useful if they are transferred to the output file. Such a feature would make gama much more useful in a large production system as the one we are currently building.

 

Is there an interest in adding such functionality to gama? I am happy to make the changes myself but I may need a bit of guidance along the way since I am not particularly familiar with the gama code base. Below I have made a short example of how I imagine an input file looking once these changes have been made. The output file will be similar.

 

Best regards,

Kristian Evers

 

 

<?xml version="1.0" ?>

 

<gama-local xmlns="http://www.gnu.org/software/gama/gama-local">

<network axes-xy="sw" angles="left-handed">

 

<description>

Demonstration of additional usefull tags for observations.

 

Based on the skorepa-gako2010.gkf example file.

</description>

 

<!-- parameters  sigma-apr="60" / -->

 

<points-observations>

 

<point id="A" z="0.000" fix="z"/>

<point id="B"           adj="z" />

<point id="C"           adj="z" />

<point id="D"           adj="z" />

<point id="E"           adj="z" />

<point id="F"           adj="z" />

 

 

<height-differences>

  <dh from="A" to="B" val= "+0.12479" dist="0.12636" id="obs01" time="2018-12-13 12:34:20"/>  <!-- dist. in km -->

  <dh from="B" to="A" val= "-0.12473" dist="0.12636" id="obs02" time="2018-12-11 17:05:00"/>

  <dh from="E" to="A" val= "+2.66193" dist="0.24195" id="obs03" time="2018-12-11 15:21:00"/>  <!-- 2 -->

  <dh from="A" to="E" val= "-2.66204" dist="0.24195" id="obs04" time="2018-12-11 14:27:00"/>

  <dh from="D" to="C" val= "+0.82741" dist="0.54424" id="obs05" time="2018-12-07 15:40:00"/>  <!-- 3 -->

  <dh from="C" to="D" val= "-0.82682" dist="0.54424" id="obs06" time="2018-12-05 09:29:00"/>

  <dh from="E" to="D" val= "+8.34616" dist="0.27615" id="obs07" time="2018-12-05 09:08:00"/>  <!-- 4 -->

  <dh from="D" to="E" val= "-8.34621" dist="0.27615" id="obs08" time="2018-12-05 08:51:00"/>

  <dh from="E" to="F" val= "-3.14431" dist="0.14442" id="obs09" time="2018-12-05 08:23:00"/>  <!-- 5 -->

  <dh from="F" to="E" val= "+3.14447" dist="0.14442" id="obs10" time="2018-12-04 07:59:00"/>

  <dh from="B" to="F" val= "-5.93123" dist="0.36160" id="obs11" time="2018-12-04 07:54:00"/>  <!-- 6 -->

  <dh from="F" to="B" val= "+5.93105" dist="0.36160" id="obs12" time="2018-11-30 12:18:00"/>

  <dh from="A" to="F" val= "-5.80611" dist="0.35038" id="obs13" time="2018-11-26 13:41:00"/>  <!-- 7 -->

  <dh from="F" to="A" val= "+5.80630" dist="0.35038" id="obs14" time="2018-11-22 16:22:00"/>

  <dh from="F" to="D" val="+11.49133" dist="0.54641" id="obs15" time="2018-11-22 15:23:00"/>  <!-- 8 -->

  <dh from="D" to="F" val="-11.49079" dist="0.54641" id="obs16" time="2018-11-19 16:22:00"/>

  <dh from="C" to="A" val= "-6.51194" dist="0.21619" id="obs17" time="2018-10-29 14:06:00"/>  <!-- 9 -->

  <dh from="A" to="C" val= "+6.51220" dist="0.21619" id="obs18" time="2018-10-26 18:33:00"/>

</height-differences>

 

</points-observations>

 

</network>

</gama-local>

_______________________________________________
Bug-gama mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-gama


reply via email to

[Prev in Thread] Current Thread [Next in Thread]