[Cartoweb-users] Geostatistics with Postgres

Albert Casanovas casanovas at k2sistemas.com.br
Mon Jun 2 09:54:59 EDT 2008


Hi Oliver,

We managed to get the geostats demo working with the PostGres database. Basically there are two options:

- Modify the DBF file with the result from the query and let the shapefile be shown using the information of the DBF
- Use the Postgres information obtained without using the DBF file.

The solution we did includes modifications in the Datasource formular to show one more option. We are planing to develop a HowTo to publish it in the Wiki of Cartoweb within the next days.

Regards,
Albert 


  ----- Original Message ----- 
  From: Oliver Christen 
  To: Albert Casanovas ; cartoweb-users at lists.maptools.org 
  Sent: Monday, June 02, 2008 6:27 AM
  Subject: Re: [Cartoweb-users] Geostatistics with Postgres


  Hi

  im by far not a specialist with the geostats plugin so consider my answer here as indicative only

  using a postgis layer as data source may effectively make things easier, though, if you want to use multiple table in your database, you will need to use a complex sql query in the DATA parameter.

  if SELECT .. WHERE id=x is the query in the DATA parameter, you need to make a new plugin to modify the DATA value.
  This can be done either by using the objects provided by the mapOverlay plugin or by using mapscript directly.
  Usage of mapOverlay has been explained already several time in the mailing list and there should be several example available.

  regards
  Oliver

    ----- Original Message ----- 
    From: Albert Casanovas 
    To: Damien Corpataux ; cartoweb-users at lists.maptools.org 
    Sent: Wednesday, May 28, 2008 4:25 PM
    Subject: Re: [Cartoweb-users] Geostatistics with Postgres


    Hi ,

    Two questions:

    1. Do you think that to adapt the plugin geostat to get the DATA from a SQL connection instead of a DBF file is only necessary to edit the map file?

    2. How can pass a variable from the ServerGeostat.php to the Map file for a SELECT .. WHERE id=x ?

    Thanks a lot,
    Albert

      ----- Original Message ----- 
      From: Damien Corpataux 
      To: Albert Casanovas ; cartoweb-users at lists.maptools.org >> carto web 
      Sent: Wednesday, May 28, 2008 5:44 AM
      Subject: Re: [Cartoweb-users] Geostatistics with Postgres


      Hi Albert,

      So far, the whichShapes() method belongs to the LayerObj (http://mapserver.gis.umn.edu/docs/reference/phpmapscript-class/classes/layerobj).

      Regards,
      Damien


      Albert Casanovas wrote: 
        Thanks Oliver,

        I am working in the adaptation of the geostat plugin to get the information from through SQL queries. According to what I have analyzed, the modifications needed to be done are:

        - Configuration file geostat.ini with the information of the database for the connection.

        - Parsing of the geostat.ini file in the method getConfLayers() of the server/ServerGeostat.php file

        - Distribution for the requested layer and attribute in the method getDistribFromSpatialData($layer, $attrib) of the server/ServerGeostat.php file

        At the moment I am in this third step and I would like to ask about the whichShapes method in this line

        $msLayer->whichShapes($rect);

        I cannot find where is this is any method implemented in any library of the mapObject.


        Do you have any suggestion about doing this implementation?

        Best Regards,
        Albert

          ----- Original Message ----- 
          From: Oliver Christen 
          To: Albert Casanovas ; cartoweb-users at lists.maptools.org 
          Sent: Friday, May 23, 2008 5:45 AM
          Subject: Re: [Cartoweb-users] Geostatistics with Postgres


          Hi

          im sorry but this is not implemented yet.

          regards
          Oliver
            ----- Original Message ----- 
            From: Albert Casanovas 
            To: cartoweb-users at lists.maptools.org 
            Sent: Tuesday, May 20, 2008 6:14 PM
            Subject: [Cartoweb-users] Geostatistics with Postgres


            Hi,

            I would to know if there is posible to get the values from a database instead a .dbf file in the demoGeostat demo like is doing in the example:

            www.cartoweb.org/demos/demoGeostat.php

            Which modifications should I do to the pluguin in order to allow it to take the values from a database?
            Can I have the map in a shapefile and its information in the database?


            Thanks a lot,
            Albert Casanovas 


--------------------------------------------------------------------
            _______________________________________________
            Cartoweb-users mailing list
            Cartoweb-users at lists.maptools.org
            http://lists.maptools.org/mailman/listinfo/cartoweb-users

------------------------------------------------------------------------
_______________________________________________
Cartoweb-users mailing list
Cartoweb-users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/cartoweb-users
  


      -- 
      Camptocamp SA
      Damien Corpataux
      PSE A
      CH-1015 Lausanne

      +41 21 619 10 22 (Direct)
      +41 21 619 10 10 (Centrale)
      +41 21 619 10 00 (Fax)

      P Please consider the environment 
      Do you really need to print this email? 


----------------------------------------------------------------------------


    _______________________________________________
    Cartoweb-users mailing list
    Cartoweb-users at lists.maptools.org
    http://lists.maptools.org/mailman/listinfo/cartoweb-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20080602/76813870/attachment.html


More information about the Cartoweb-users mailing list