[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mapbender-users
Subject:    Re: [Mapbender-users] Mapbender3: Change digitizing
From:       info () blumige-landschaften ! de
Date:       2016-04-12 7:02:50
Message-ID: 20160412070250.9B3C7EC042B () dd19722 ! kasserver ! com
[Download RAW message or body]

[Attachment #2 (text/html)]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" \
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html lang="de" \
xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><head><meta \
http-equiv="Content-Type" content="text/html charset=ISO-8859-1" \
/><title></title><style \
type="text/css">html,body{font-size:12px;background-color:#fff;color:#333;font-family:sans-serif,Arial,Verdana,"Trebuchet \
MS";line-height:1.4;}</style></head><body><p>Yes, of course :-)</p>

<p>&nbsp;
</p><div>-----------------------------<br>
<br>
http://blumige-landschaften.de<br>
<br>
Dr. Kai Behncke<br>
<br>
Am Wulberg 15<br>
<br>
49324 Melle<br>
<br>
Tel.: (ab 18.00 Uhr): 0176-84019660</div>
<p></p>

<p>Astrid Emde schrieb am 12.04.2016 08:17:</p>

<blockquote cite="mid:a34547c4439e113c32ccd89868f89829@wheregroup.com" type="cite">
<pre>Hello Kai,

great. Thanks for sharing your code!

I like your application. Can we add it to the gallery?

<a href="http://mapbender3.org/?q=en/gallery" target="_blank" \
title="http://mapbender3.org/?q=en/gallery">http://mapbender3.org/?q=en/gallery</a>

Regards Astrid


Am 2016-04-12 06:49, schrieb Dr. Kai Behncke:
&gt; Oh, sorry, wrong link.
&gt;  To set entries by digitizing a link like
&gt; 
&gt; 
&gt; <a href="http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla@" \
target="_blank" title="http://www.blumige-landschaft.de/mapbender3/application/Blumige \
-Landschaften?anwender=blablablabla@">http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla@</a>
 &gt; [5]
&gt; 
&gt;  is used.
&gt; 
&gt;  Best regards, Kai
&gt; 
&gt; Am 12.04.2016 um 05:55 schrieb Dr. Kai Behncke:
&gt; 
&gt;&gt; Hi you all,
&gt;&gt; 
&gt;&gt; we found a solution for that, well not a very nice one, because of
&gt;&gt; no knowledge of symfony, the code is "hot-chaos", but it works:
&gt;&gt; 
&gt;&gt; In:
&gt;&gt; 
&gt; mapbender3/vendor/mapbender/digitizer/Mapbender/DigitizerBundle/Element/Digitizer.php
 &gt;&gt; 
&gt;&gt; 
&gt;&gt; From line 169:
&gt;&gt; 
&gt;&gt; 169 public function httpAction($action)
&gt;&gt; 170 {
&gt;&gt; 171 /**
&gt;&gt; 172 * @var $requestService Request
&gt;&gt; 173 */
&gt;&gt; 174 $der_nutzername=$this-&gt;container-&gt;get('request');
&gt;&gt; 175
&gt;&gt; 176
&gt;&gt; 177 if ((substr_count($der_nutzername,'anwender=')==1) AND
&gt;&gt; (substr_count($der_nu tzername,'@')==1)) {
&gt;&gt; 178
&gt;&gt; 179
&gt;&gt; 180 $der_nutzername_array = explode ('anwender=',
&gt;&gt; $der_nutzername );
&gt;&gt; 181 $der_nutzername=$der_nutzername_array[1];
&gt;&gt; 182
&gt;&gt; 183 $der_nutzername=trim($der_nutzername);
&gt;&gt; 184 $der_nutzername_array2=explode ('@',$der_nutzername);
&gt;&gt; 185 $der_nutzername=$der_nutzername_array2[0];
&gt;&gt; 186 $der_nutzername=str_replace(" ","",$der_nutzername);
&gt;&gt; 187 $der_nutzername="digiowner='".$der_nutzername."'";
&gt;&gt; 188 $der_nutzername=trim($der_nutzername);
&gt;&gt; 189 $der_nutzername=str_replace(" ","",$der_nutzername);
&gt;&gt; 190 // $der_nutzername="nnn".$der_nutzername-&gt;get('Referer');
&gt;&gt; 191 }
&gt;&gt; 192 else {
&gt;&gt; 193
&gt;&gt; 194 $der_nutzername="digiowner='xxxxx'";
&gt;&gt; 195 }
&gt;&gt; 
&gt;&gt; ....
&gt;&gt; ......
&gt;&gt; (This is to get the user of a request; for that, in the
&gt;&gt; digitite-table (e.g. "poi" a column "digiowner" is important)
&gt;&gt; 
&gt;&gt; In
&gt;&gt; 
&gt; mapbender3/vendor/mapbender/digitizer/Mapbender/DigitizerBundle/Entity/FeatureType.php
 &gt;&gt; 
&gt;&gt; In line 396:
&gt;&gt; 
&gt;&gt; public function search(array $criteria = array(),$neue_variable)
&gt;&gt; {
&gt;&gt; 
&gt;&gt; // In $neue_variable a username is transported
&gt;&gt; 
&gt;&gt; 422: $where=$neue_variable;
&gt;&gt; 423 if($where){
&gt;&gt; 424 $queryBuilder-&gt;andWhere($where);
&gt;&gt; 425 }
&gt;&gt; 
&gt;&gt; And: in
&gt;&gt; 
&gt; mapbender/digitizer/Mapbender/DigitizerBundle/Resources/public/mapbender.element.digitizer.js
 &gt;&gt; 
&gt;&gt; Line 1305: var the_request=JSON.stringify(request);
&gt;&gt; 1306 the_request+=""
&gt;&gt; 
&gt;&gt; ...
&gt;&gt; 
&gt;&gt; .....
&gt;&gt; 1315 if (uri=="save"){
&gt;&gt; 1316
&gt;&gt; 1317
&gt;&gt; 
&gt; the_request=the_request.replace('}',',"digiowner":"'+der_nutzername+'"}');
&gt;&gt; ....
&gt;&gt; ........
&gt;&gt; 
&gt;&gt; A changed request is build so a geometry belongs to a specific
&gt;&gt; user...
&gt;&gt; 
&gt;&gt; So if someone calls:
&gt;&gt; 
&gt;&gt; 
&gt; <a href="http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften" \
target="_blank" title="http://www.blumige-landschaft.de/mapbender3/application/Blumige \
-Landschaften">http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften</a>
 &gt;&gt; [2]
&gt;&gt; 
&gt;&gt; he can`t insert entries.
&gt;&gt; If one calls:
&gt;&gt; 
&gt; <a href="http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla" \
target="_blank" title="http://www.blumige-landschaft.de/mapbender3/application/Blumige \
-Landschaften?anwender=blablablabla">http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla</a>
 &gt;&gt; [3]
&gt;&gt; 
&gt;&gt; he can.
&gt;&gt; 
&gt;&gt; I know, it`s not a "save"-procedure at all, but enough for the
&gt;&gt; purposes of that project :-)
&gt;&gt; 
&gt;&gt; the project is: <a href="http://blumige-landschaften.de" target="_blank" \
title="http://blumige-landschaften.de">http://blumige-landschaften.de</a> [4] \
&gt;&gt;  &gt;&gt; A databse-trigger sets area and time of an entry
&gt;&gt; 
&gt;&gt; CREATE OR REPLACE FUNCTION datum_einspielen()
&gt;&gt; RETURNS trigger AS
&gt;&gt; $BODY$
&gt;&gt; DECLARE
&gt;&gt; 
&gt;&gt; the_id integer;
&gt;&gt; abfrage1 text;
&gt;&gt; 
&gt;&gt; BEGIN
&gt;&gt; the_id:=max(gid) as gid from poi;
&gt;&gt; 
&gt;&gt; abfrage1:='UPDATE poi SET date_favorite=TO_CHAR(CURRENT_DATE,
&gt;&gt; ''DD.MM.YYYY'') WHERE gid='||the_id;
&gt;&gt; EXECUTE abfrage1;
&gt;&gt; RAISE NOTICE 'Here we go........%',the_id;
&gt;&gt; RETURN NULL;
&gt;&gt; END;
&gt;&gt; $BODY$
&gt;&gt; LANGUAGE 'plpgsql' VOLATILE;
&gt;&gt; 
&gt;&gt; CREATE TRIGGER Trigger_after_poi_entry
&gt;&gt; AFTER INSERT on poi
&gt;&gt; FOR EACH ROW
&gt;&gt; EXECUTE PROCEDURE datum_einspielen();
&gt;&gt; 
&gt;&gt; CREATE OR REPLACE FUNCTION give_me_area_and_date()
&gt;&gt; RETURNS trigger AS
&gt;&gt; $BODY$
&gt;&gt; DECLARE
&gt;&gt; 
&gt;&gt; the_id integer;
&gt;&gt; the_area numeric;
&gt;&gt; abfrage1 text;
&gt;&gt; abfrage2 text;
&gt;&gt; block text;
&gt;&gt; BEGIN
&gt;&gt; the_id:=max(gid) as gid from polygons;
&gt;&gt; the_area:=round(cast(st_area(st_transform(geom,31467)) as
&gt;&gt; numeric),2) from polygons where gid=the_id;
&gt;&gt; 
&gt;&gt; abfrage1:='UPDATE polygons SET date_favorite=TO_CHAR(CURRENT_DATE,
&gt;&gt; ''DD.MM.YYYY'') WHERE gid='||the_id;
&gt;&gt; EXECUTE abfrage1;
&gt;&gt; abfrage2:='UPDATE polygons SET area='''||the_area||''' WHERE
&gt;&gt; gid='||the_id;
&gt;&gt; EXECUTE abfrage2;
&gt;&gt; 
&gt;&gt; RETURN NULL;
&gt;&gt; END;
&gt;&gt; $BODY$
&gt;&gt; LANGUAGE 'plpgsql' VOLATILE;
&gt;&gt; 
&gt;&gt; CREATE TRIGGER Trigger_after_polygon_entry
&gt;&gt; AFTER INSERT on polygons
&gt;&gt; FOR EACH ROW
&gt;&gt; EXECUTE PROCEDURE give_me_area_and_date();
&gt;&gt; 
&gt;&gt; Best regards, Kai
&gt;&gt; 
&gt;&gt; --
&gt;&gt; ---------------------------
&gt;&gt; Blumige-Landschaften.de
&gt;&gt; Dr. Kai Behncke
&gt;&gt; Am Wulberg 15
&gt;&gt; 49324 Melle
&gt;&gt; Tel.: 0176-84019660 (ab 18.00 Uhr)
&gt;&gt; 
&gt;&gt; _______________________________________________
&gt;&gt; Mapbender_users mailing list
&gt;&gt; Mapbender_users@lists.osgeo.org
&gt;&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapbender_users" \
target="_blank" title="http://lists.osgeo.org/mailman/listinfo/mapbender_users">http://lists.osgeo.org/mailman/listinfo/mapbender_users</a> \
[1] &gt; 
&gt; --
&gt; ---------------------------
&gt; Blumige-Landschaften.de
&gt; Dr. Kai Behncke
&gt; Am Wulberg 15
&gt; 49324 Melle
&gt; Tel.: 0176-84019660 (ab 18.00 Uhr)
&gt; 
&gt; 
&gt; Links:
&gt; ------
&gt; [1] <a href="http://lists.osgeo.org/mailman/listinfo/mapbender_users" \
target="_blank" title="http://lists.osgeo.org/mailman/listinfo/mapbender_users">http://lists.osgeo.org/mailman/listinfo/mapbender_users</a>
 &gt; [2] 
&gt; <a href="http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften" \
target="_blank" title="http://www.blumige-landschaft.de/mapbender3/application/Blumige \
-Landschaften">http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften</a>
 &gt; [3]
&gt; <a href="http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla" \
target="_blank" title="http://www.blumige-landschaft.de/mapbender3/application/Blumige \
-Landschaften?anwender=blablablabla">http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla</a>
 &gt; [4] <a href="http://blumige-landschaften.de" target="_blank" \
title="http://blumige-landschaften.de">http://blumige-landschaften.de</a> &gt; [5]
&gt; <a href="http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla@" \
target="_blank" title="http://www.blumige-landschaft.de/mapbender3/application/Blumige \
-Landschaften?anwender=blablablabla@">http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla@</a>
 &gt; 
&gt; _______________________________________________
&gt; Mapbender_users mailing list
&gt; Mapbender_users@lists.osgeo.org
&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapbender_users" \
target="_blank" title="http://lists.osgeo.org/mailman/listinfo/mapbender_users">http://lists.osgeo.org/mailman/listinfo/mapbender_users</a>


-- 
Mit freundlichen Grüßen

Astrid Emde
GIS-Consultant

-----------------------------------
Aufwind durch Wissen!
Qualifizierte OpenSource-Schulungen
bei der <a href="http://www.foss-academy.eu" target="_blank" \
                title="www.foss-academy.eu">www.foss-academy.eu</a>
-----------------------------------

  Astrid Emde
  WhereGroup GmbH &amp; Co.KG
  Eifelstraße 7
  53119 Bonn
  Germany

  Fon: +49(0)228 90 90 38 - 19
  Fax: +49(0)228 90 90 38 - 11

  astrid.emde@wheregroup.com
  <a href="http://www.wheregroup.com" target="_blank" \
title="www.wheregroup.com">www.wheregroup.com</a>

  Folgen Sie der WhereGroup auf twitter: 
<a href="http://twitter.com/WhereGroup_com" target="_blank" \
title="http://twitter.com/WhereGroup_com">http://twitter.com/WhereGroup_com</a>

Amtsgericht Bonn, HRA 6788
-------------------------------
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
-------------------------------
  pgp-public key:
  <a href="http://pgp.mit.edu:11371/pks/lookup?search=0x06DA52D72D515284" \
target="_blank" title="http://pgp.mit.edu:11371/pks/lookup?search=0x06DA52D72D515284">http://pgp.mit.edu:11371/pks/lookup?search=0x06DA52D72D515284</a>
  Signierte und/oder verschlüsselte Nachrichten sind sehr willkommen
  Signed and/or encrypted mail is highly appreciated

</pre>
</blockquote></body></html>


[Attachment #3 (text/plain)]

_______________________________________________
Mapbender_users mailing list
Mapbender_users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapbender_users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic