Re: [pmapper-users] Search XML with PostGIS
see my mail to Andreas. In your case in addition: make you life easier and put your join in a DB view and try using this view as DATA. armin On 17/10/2008 16:38, Marcello Benigno wrote: > Hi Andreas and Armin, > > I have te *same problem* too. why it happens? I have defined the XML as > follows: > > > > wildcard="0" /> > > > > and my layer: > > LAYER > NAME 'acudes1' > GROUP 'acudes_grupo' > > # POSTGIS # > CONNECTIONTYPE postgis > CONNECTION "dbname= user= host= password=" > DATA "the_geom FROM > (SELECT a.cd_acude AS oid , a.ds_acude, a.nm_anoconclusao, > a.ds_riachobarrado, a.ds_tipobarragem, a.nm_capacidade, > a.nm_areabaciahidrografica, a.nm_baciahidraulica, a.nm_vazaoregularizada, > a.nm_extensaocoroamento, > a.nm_larguracoroamento, a.nm_cotacoroamento, a.nm_alturamaxima, > a.ds_tiposangradouro, > a.nm_largurasangradouro, a.nm_laminamaximasangradouro, a.nm_cotasoleira, > a.ds_tipotomadadagua, a.nm_diametrotomadadagua, a.nm_comprimentotomadadagua, > > a.ds_obs, cd_statusacude, a.fl_gerenciado, a.vl_valorestimado, a.the_geom AS > the_geom, > m.ds_municipio, b.ds_baciahidrografica > FROM acudes a, municipio m, baciahidrografica b > where a.cd_baciahidrografica = b.cd_baciahidrografica AND a.cd_municipio = > m.cd_municipio AND cd_statusacude=1) > as foo USING UNIQUE oid USING SRID=29184" > # END POSTGIS # > TYPE Point > TEMPLATE void > TOLERANCE 20 > TOLERANCEUNITS pixels > METADATA > "DESCRIPTION" "Açudes" > "RESULT_FIELDS" "ds_acude, ds_municipio, ds_baciahidrografica, > ds_riachobarrado, ds_tipobarragem, nm_capacidade, nm_areabaciahidrografica, > nm_vazaoregularizada, oid" > "RESULT_HEADERS" "Nome do Açude, Município, Bacia Hidrográfica, Rio Barrado, > Tipo de Barragem, Capacidade (m3), Bacia Hidrográfica (ha), Vazão (m3/s), > Detalhamento" > "RESULT_HYPERLINK" "oid||Clique aqui para mais informações" > END # Metadata > > LABELITEM 'ds_acude' > LABELMINSCALE 100 > LABELMAXSCALE 160 > > CLASS > NAME 'Construído' > LABEL > TYPE TRUETYPE > FONT FreeSans > POSITION UR > BUFFER 5 > SIZE 8 > COLOR 0 0 255 > OUTLINECOLOR 255 255 255 > ANTIALIAS TRUE > FORCE TRUE > END #LABEL > > STYLE > SYMBOL 'triangle' > SIZE 12 > COLOR 0 0 255 > OUTLINECOLOR 0 0 0 > END #STYLE > END #CLASS > END #LAYER > #- > > 2008/10/17 Andreas Haux <[EMAIL PROTECTED]> > >> Armin, >> >> thanks for your feedback - and sorry for coming back with this issue. >> >> I have defined the XML as follows: >> >> >> >> >> >> >>$ >> >> >> >> > wildcard="1" /> >> >> >> >> >> >> >> - The layer name in the .map-file is "pfarreien" >> - The database connection is defined in the map file >> - The database is "world", the table is "bamberg_pfarreien"; but this >> seems not to be neccessary here? >> - The column of the table where the search shall took place is "pfarrei" >> >> Everytime I start a search I only see the "working" image in the top >> right corner and nothing happens. >> >> After hours of testing - could you please have a look whether >> something is wrong with the xml? Thanks!! >> >> Regards >> Andreas >> -- >> screen & paper Werbeagentur GmbH >> Firmensitz: Martin-Luther-Straße 6, D-85354 Freising >> Telefon: +49-(0)8161-97 94-0 >> Telefax: +49-(0)8161-97 94-23 >> Registergericht: Freising, HRB 104 687 >> Geschäftsführer: Andreas Haux >> http://www.screen-paper.de >> http://www.csite.de >> http://www.maps-on-demand.com >> http://www.mapshop-online.de >> -- >> >> Disclaimer >> >> Der Inhalt dieser E- Mail ist ausschließlich für den bezeichneten >> Adressaten bestimmt und enthält vertrauliche und/oder rechtlich >> geschützte Informationen. Wenn diese E- Mail nicht an Sie persönlich >> adressiert ist oder Sie die Vertretung sein sollten, so beachten Sie, >> dass jede Form der Kenntnisnahme, Veröffentlichung, Vervielfältigung >> oder die Weitergabe des Inhalts dieser E- Mail unzulässig ist. >> >> This e-mail may contain confidential and/or privileged information. If >> you are not the intended recipient (or have received this e-mail in >> error) please notify the sender immediately and destroy this e-mail. >> Any unauthorised copying, disclosure or distribution of the material >> in this e-mail is strictly forbidden. >> >> >> >> Am 17.10.2008 um 12:50 schrieb Armin Burger: >> >>> Andreas >>> >>> have a look here >>> >>> http://svn.pmapper.net/trac/browser/pmapper/trunk/config/dev/ >>> search.xml >>> >>> If you do not need things like options/suggest then the definition >>> should be quite straightforward: >>> >>> >>> >>> >>> >>> >>> >>> For options/suggest username/passwd need to be defined in the dsn like >>> >>> pgsql://username:[EMAIL PROTECTED]/gisdb >>> >>> >>> armin >>> >>> >>> On Fri, Oct 1
Re: [pmapper-users] Search XML with PostGIS
Andreas 1. Check all the error logs (mainly PHP, but also Javascript) 2. set the debugging to value 3 and analyze the debug output. You should get the query strings sent to the database. Try to launch this query directly on the database via a generic DB client. See the FAQ for more details http://svn.pmapper.net/trac/wiki/FaqDebugging Report any error you get, including some debugging info. Include the map file, etc. There's a whole bunch of things you need to do and analyze. Armin On 17/10/2008 15:46, Andreas Haux wrote: > Armin, > > thanks for your feedback - and sorry for coming back with this issue. > > I have defined the XML as follows: > > > > > > > $ > > > > wildcard="1" /> > > > > > > > - The layer name in the .map-file is "pfarreien" > - The database connection is defined in the map file > - The database is "world", the table is "bamberg_pfarreien"; but this > seems not to be neccessary here? > - The column of the table where the search shall took place is "pfarrei" > > Everytime I start a search I only see the "working" image in the top > right corner and nothing happens. > > After hours of testing - could you please have a look whether something > is wrong with the xml? Thanks!! > > Regards > Andreas > -- > screen & paper Werbeagentur GmbH > Firmensitz: Martin-Luther-Straße 6, D-85354 Freising > Telefon: +49-(0)8161-97 94-0 > Telefax: +49-(0)8161-97 94-23 > Registergericht: Freising, HRB 104 687 > Geschäftsführer: Andreas Haux > http://www.screen-paper.de > http://www.csite.de > http://www.maps-on-demand.com > http://www.mapshop-online.de > -- > > Disclaimer > > Der Inhalt dieser E- Mail ist ausschließlich für den bezeichneten > Adressaten bestimmt und enthält vertrauliche und/oder rechtlich > geschützte Informationen. Wenn diese E- Mail nicht an Sie persönlich > adressiert ist oder Sie die Vertretung sein sollten, so beachten Sie, > dass jede Form der Kenntnisnahme, Veröffentlichung, Vervielfältigung > oder die Weitergabe des Inhalts dieser E- Mail unzulässig ist. > > This e-mail may contain confidential and/or privileged information. If > you are not the intended recipient (or have received this e-mail in > error) please notify the sender immediately and destroy this e-mail. Any > unauthorised copying, disclosure or distribution of the material in this > e-mail is strictly forbidden. > > > > Am 17.10.2008 um 12:50 schrieb Armin Burger: > >> Andreas >> >> have a look here >> >> http://svn.pmapper.net/trac/browser/pmapper/trunk/config/dev/search.xml >> >> If you do not need things like options/suggest then the definition >> should be quite straightforward: >> >> >> >> >> >> >> >> For options/suggest username/passwd need to be defined in the dsn like >> >> pgsql://username:[EMAIL PROTECTED]/gisdb >> >> >> armin >> >> >> On Fri, Oct 17, 2008 at 9:23 AM, Andreas Haux >> <[EMAIL PROTECTED]> wrote: >>> Hi, >>> >>> p.mapper is great - and I am experimenting for quite a while but >>> didn't found out how exactly to define a search funktion in the >>> search.xml file using PostGIS; the examples show the connection >>> without sending a username and password. >>> >>> e.g.: >>> Database name ist testdb >>> Tablename is testfile >>> Username is testperson >>> Password is testpassword >>> >>> and I would like to select all the geometries where the field NAME is >>> >>> >>> Here is your example where I have tried to fill this informations in, >>> but I failed - I would simply like to establish a connection but did >>> not know how to handle username and password (since the XML file is >>> open to the public I could/would not include it here): >>> >>> >>> >>>>> wildcard="2"> >>>>> sort="asc" minlength="1" dependfld="cmcncd"> >>>pgsql:// >>> postgres:[EMAIL PROTECTED]/testdb >>>SELECT DISTINCT name FROM testtfile WHERE >>> name ~* '^[search]' ORDER BY name >>> >>> >>> >>> >>> >>> As far as I understand I don't need the suggest type in my case >>> instead of receiving the results immediately at the map. So the most >>> simple example how to write a request with PostGIS would be appreciated! >>> >>> Thanks for your help! >>> >>> Regards >>> Andreas >>> >>> - >>> >>> This SF.Net email is sponsored by the Moblin Your Move Developer's >>> challenge >>> Build the coolest Linux based applications with Moblin SDK & win >>> great prizes >>> Grand prize is a trip for two to an Open Source event anywhere in the >>> world >>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>> ___ >>> pmapper-users mailing list >>> pmapper-users@lists.sourceforge.
Re: [pmapper-users] Search XML with PostGIS
Hi Andreas and Armin, I have te *same problem* too. why it happens? I have defined the XML as follows: and my layer: LAYER NAME 'acudes1' GROUP 'acudes_grupo' # POSTGIS # CONNECTIONTYPE postgis CONNECTION "dbname= user= host= password=" DATA "the_geom FROM (SELECT a.cd_acude AS oid , a.ds_acude, a.nm_anoconclusao, a.ds_riachobarrado, a.ds_tipobarragem, a.nm_capacidade, a.nm_areabaciahidrografica, a.nm_baciahidraulica, a.nm_vazaoregularizada, a.nm_extensaocoroamento, a.nm_larguracoroamento, a.nm_cotacoroamento, a.nm_alturamaxima, a.ds_tiposangradouro, a.nm_largurasangradouro, a.nm_laminamaximasangradouro, a.nm_cotasoleira, a.ds_tipotomadadagua, a.nm_diametrotomadadagua, a.nm_comprimentotomadadagua, a.ds_obs, cd_statusacude, a.fl_gerenciado, a.vl_valorestimado, a.the_geom AS the_geom, m.ds_municipio, b.ds_baciahidrografica FROM acudes a, municipio m, baciahidrografica b where a.cd_baciahidrografica = b.cd_baciahidrografica AND a.cd_municipio = m.cd_municipio AND cd_statusacude=1) as foo USING UNIQUE oid USING SRID=29184" # END POSTGIS # TYPE Point TEMPLATE void TOLERANCE 20 TOLERANCEUNITS pixels METADATA "DESCRIPTION" "Açudes" "RESULT_FIELDS" "ds_acude, ds_municipio, ds_baciahidrografica, ds_riachobarrado, ds_tipobarragem, nm_capacidade, nm_areabaciahidrografica, nm_vazaoregularizada, oid" "RESULT_HEADERS" "Nome do Açude, Município, Bacia Hidrográfica, Rio Barrado, Tipo de Barragem, Capacidade (m3), Bacia Hidrográfica (ha), Vazão (m3/s), Detalhamento" "RESULT_HYPERLINK" "oid||Clique aqui para mais informações" END # Metadata LABELITEM 'ds_acude' LABELMINSCALE 100 LABELMAXSCALE 160 CLASS NAME 'Construído' LABEL TYPE TRUETYPE FONT FreeSans POSITION UR BUFFER 5 SIZE 8 COLOR 0 0 255 OUTLINECOLOR 255 255 255 ANTIALIAS TRUE FORCE TRUE END #LABEL STYLE SYMBOL 'triangle' SIZE 12 COLOR 0 0 255 OUTLINECOLOR 0 0 0 END #STYLE END #CLASS END #LAYER #- 2008/10/17 Andreas Haux <[EMAIL PROTECTED]> > Armin, > > thanks for your feedback - and sorry for coming back with this issue. > > I have defined the XML as follows: > > > > > > >$ > > > > wildcard="1" /> > > > > > > > - The layer name in the .map-file is "pfarreien" > - The database connection is defined in the map file > - The database is "world", the table is "bamberg_pfarreien"; but this > seems not to be neccessary here? > - The column of the table where the search shall took place is "pfarrei" > > Everytime I start a search I only see the "working" image in the top > right corner and nothing happens. > > After hours of testing - could you please have a look whether > something is wrong with the xml? Thanks!! > > Regards > Andreas > -- > screen & paper Werbeagentur GmbH > Firmensitz: Martin-Luther-Straße 6, D-85354 Freising > Telefon: +49-(0)8161-97 94-0 > Telefax: +49-(0)8161-97 94-23 > Registergericht: Freising, HRB 104 687 > Geschäftsführer: Andreas Haux > http://www.screen-paper.de > http://www.csite.de > http://www.maps-on-demand.com > http://www.mapshop-online.de > -- > > Disclaimer > > Der Inhalt dieser E- Mail ist ausschließlich für den bezeichneten > Adressaten bestimmt und enthält vertrauliche und/oder rechtlich > geschützte Informationen. Wenn diese E- Mail nicht an Sie persönlich > adressiert ist oder Sie die Vertretung sein sollten, so beachten Sie, > dass jede Form der Kenntnisnahme, Veröffentlichung, Vervielfältigung > oder die Weitergabe des Inhalts dieser E- Mail unzulässig ist. > > This e-mail may contain confidential and/or privileged information. If > you are not the intended recipient (or have received this e-mail in > error) please notify the sender immediately and destroy this e-mail. > Any unauthorised copying, disclosure or distribution of the material > in this e-mail is strictly forbidden. > > > > Am 17.10.2008 um 12:50 schrieb Armin Burger: > > > Andreas > > > > have a look here > > > > http://svn.pmapper.net/trac/browser/pmapper/trunk/config/dev/ > > search.xml > > > > If you do not need things like options/suggest then the definition > > should be quite straightforward: > > > > > > > > > > > > > > > > For options/suggest username/passwd need to be defined in the dsn like > > > > pgsql://username:[EMAIL PROTECTED]/gisdb > > > > > > armin > > > > > > On Fri, Oct 17, 2008 at 9:23 AM, Andreas Haux > > <[EMAIL PROTECTED]> wrote: > >> Hi, > >> > >> p.mapper is great - and I am experimenting for quite a while but > >> didn't found out how exactly to define a search funktion in the > >> search.xml file using PostGIS; the examples show the connection > >> without sending a username and password. > >> > >> e.g.: > >> Database name ist testdb > >> Tablename is testfile > >> Username is testperson > >> Pas
Re: [pmapper-users] Search XML with PostGIS
Armin, thanks for your feedback - and sorry for coming back with this issue. I have defined the XML as follows: $ - The layer name in the .map-file is "pfarreien" - The database connection is defined in the map file - The database is "world", the table is "bamberg_pfarreien"; but this seems not to be neccessary here? - The column of the table where the search shall took place is "pfarrei" Everytime I start a search I only see the "working" image in the top right corner and nothing happens. After hours of testing - could you please have a look whether something is wrong with the xml? Thanks!! Regards Andreas -- screen & paper Werbeagentur GmbH Firmensitz: Martin-Luther-Straße 6, D-85354 Freising Telefon: +49-(0)8161-97 94-0 Telefax: +49-(0)8161-97 94-23 Registergericht: Freising, HRB 104 687 Geschäftsführer: Andreas Haux http://www.screen-paper.de http://www.csite.de http://www.maps-on-demand.com http://www.mapshop-online.de -- Disclaimer Der Inhalt dieser E- Mail ist ausschließlich für den bezeichneten Adressaten bestimmt und enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn diese E- Mail nicht an Sie persönlich adressiert ist oder Sie die Vertretung sein sollten, so beachten Sie, dass jede Form der Kenntnisnahme, Veröffentlichung, Vervielfältigung oder die Weitergabe des Inhalts dieser E- Mail unzulässig ist. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Am 17.10.2008 um 12:50 schrieb Armin Burger: > Andreas > > have a look here > > http://svn.pmapper.net/trac/browser/pmapper/trunk/config/dev/ > search.xml > > If you do not need things like options/suggest then the definition > should be quite straightforward: > > > > > > > > For options/suggest username/passwd need to be defined in the dsn like > > pgsql://username:[EMAIL PROTECTED]/gisdb > > > armin > > > On Fri, Oct 17, 2008 at 9:23 AM, Andreas Haux > <[EMAIL PROTECTED]> wrote: >> Hi, >> >> p.mapper is great - and I am experimenting for quite a while but >> didn't found out how exactly to define a search funktion in the >> search.xml file using PostGIS; the examples show the connection >> without sending a username and password. >> >> e.g.: >> Database name ist testdb >> Tablename is testfile >> Username is testperson >> Password is testpassword >> >> and I would like to select all the geometries where the field NAME is >> >> >> Here is your example where I have tried to fill this informations in, >> but I failed - I would simply like to establish a connection but did >> not know how to handle username and password (since the XML file is >> open to the public I could/would not include it here): >> >> >> >>> wildcard="2"> >>> sort="asc" minlength="1" dependfld="cmcncd"> >>pgsql:// >> postgres:[EMAIL PROTECTED]/testdb >>SELECT DISTINCT name FROM testtfile WHERE >> name ~* '^[search]' ORDER BY name >> >> >> >> >> >> As far as I understand I don't need the suggest type in my case >> instead of receiving the results immediately at the map. So the most >> simple example how to write a request with PostGIS would be >> appreciated! >> >> Thanks for your help! >> >> Regards >> Andreas >> >> - >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win >> great prizes >> Grand prize is a trip for two to an Open Source event anywhere in >> the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> ___ >> pmapper-users mailing list >> pmapper-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/pmapper-users >> - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users
Re: [pmapper-users] Search XML with PostGIS
Andreas have a look here http://svn.pmapper.net/trac/browser/pmapper/trunk/config/dev/search.xml If you do not need things like options/suggest then the definition should be quite straightforward: For options/suggest username/passwd need to be defined in the dsn like pgsql://username:[EMAIL PROTECTED]/gisdb armin On Fri, Oct 17, 2008 at 9:23 AM, Andreas Haux <[EMAIL PROTECTED]> wrote: > Hi, > > p.mapper is great - and I am experimenting for quite a while but > didn't found out how exactly to define a search funktion in the > search.xml file using PostGIS; the examples show the connection > without sending a username and password. > > e.g.: > Database name ist testdb > Tablename is testfile > Username is testperson > Password is testpassword > > and I would like to select all the geometries where the field NAME is > > > Here is your example where I have tried to fill this informations in, > but I failed - I would simply like to establish a connection but did > not know how to handle username and password (since the XML file is > open to the public I could/would not include it here): > > > > wildcard="2"> > sort="asc" minlength="1" dependfld="cmcncd"> > pgsql:// > postgres:[EMAIL PROTECTED]/testdb > SELECT DISTINCT name FROM testtfile WHERE > name ~* '^[search]' ORDER BY name > > > > > > As far as I understand I don't need the suggest type in my case > instead of receiving the results immediately at the map. So the most > simple example how to write a request with PostGIS would be appreciated! > > Thanks for your help! > > Regards > Andreas > > - > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ___ > pmapper-users mailing list > pmapper-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pmapper-users > - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users
[pmapper-users] Search XML with PostGIS
Hi, p.mapper is great - and I am experimenting for quite a while but didn't found out how exactly to define a search funktion in the search.xml file using PostGIS; the examples show the connection without sending a username and password. e.g.: Database name ist testdb Tablename is testfile Username is testperson Password is testpassword and I would like to select all the geometries where the field NAME is Here is your example where I have tried to fill this informations in, but I failed - I would simply like to establish a connection but did not know how to handle username and password (since the XML file is open to the public I could/would not include it here): pgsql:// postgres:[EMAIL PROTECTED]/testdb SELECT DISTINCT name FROM testtfile WHERE name ~* '^[search]' ORDER BY name As far as I understand I don't need the suggest type in my case instead of receiving the results immediately at the map. So the most simple example how to write a request with PostGIS would be appreciated! Thanks for your help! Regards Andreas - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users