[postgis-devel] [SOLVED] map is not displayed using ms4w and postgis

sanjib chatterjee sanjibchatterjeegis at gmail.com
Tue May 24 23:41:08 PDT 2011


Hi All,
Thank you Chris.
Problem is solved.
I have changed

DATA 'the_geom from (select setsrid(the_geom,1) as the_geom,
oid,dag_no from "Internal_plots") as data using unique oid using
srid=1'



Ref::
http://www.osgeo.org/pipermail/mapserver-users/2005-August/009987.html

Thank you all.

With Thanks And Best Regards
Sanjib Chatterjee

On Wed, May 25, 2011 at 1:52 AM, Chris Hodgson <chodgson at refractions.net> wrote:
> This sounds like a question more appropriate for the users list. However I
> think I see your problem - if you use capital letters in the name of a table
> in postgres, you must quote that table name with double-quotes ("). How does
> this data statement work:
>
> DATA 'the_geom from "Internal_plots"'
>
> If that's not it look in the error log for mapserver (or in your web server
> error log) - there should be an error message there that will help you.
>
> Chris
>
> sanjib chatterjee wrote:
>>
>> Hi All,
>>
>> I am using geomoose2 framework + ms4w + postgresql 9.0 and postgis 1.5.
>>
>> While my mapscript use DATA  from shape file and / or from mysql table
>> ,map is generated and displayed well.
>> but when it fetch from postgresql it fails to generate map. I am not
>> getting any error message.
>>
>> Please help to find my problem.I am new in this area. I gave bellow my
>> mapscript for shape,mysql and postgis.
>>
>> read from shape:-
>> ------------------------------
>> ----------------------------------
>> MAP
>>    NAME "Internal_plots"
>>    STATUS ON
>>    TRANSPARENT ON
>>    INCLUDE "../../../geomoose_globals.map"
>>    LEGEND
>>        STATUS ON
>>        LABEL
>>        TYPE TRUETYPE
>>        FONT vera_sans
>>        SIZE 8
>>        COLOR 0 0 0
>>        END           END          LAYER
>>            NAME Internal_plots
>>          STATUS ON
>>            TYPE POLYGON
>>            LABELITEM 'DAG_NO'
>>          TRANSPARENCY 100                   LABELCACHE ON
>>            CLASSITEM 'DAG_NO'
>>          DATA './Internal_plots'
>>          CLASS
>>            NAME 'dag_no'
>>            STYLE
>>                SYMBOL 'plainline'
>>                SIZE 1
>>                COLOR 255 255 255
>>                OUTLINECOLOR 0 0 0
>>            END
>>            LABEL
>>                TYPE TRUETYPE
>>                FONT vera_sans
>>                SIZE 10
>>                ANTIALIAS TRUE
>>                COLOR -1 -1 -1
>>                OUTLINECOLOR -1 -1 -1
>>                BUFFER 4
>>                MINFEATURESIZE auto
>>                PARTIALS FALSE
>>                POSITION cc
>>            END
>>          END
>>          METADATA
>>              'identify_record'
>>  '../../Common/Template/village/identify_village.html'
>>            'peak_record'
>>  '../../Common/Template/village/village_peak.html'
>>              'select_record'
>>  '../../Common/Template/village/select_village.html'
>>            'select_header'
>> '../../Common/Template/village/select_header_village.html'
>>            'popups'
>> '../../Common/Template/village/village_popup.html'
>>            'itemquery'
>>  '../../Common/Template/village/village_itemquery.html'
>>        #    'itemquery-filteritem' 'OWNER_NAME'
>>            'itemquery-filter'    '/.*[qstring].*/i'
>>            'qstring_validation_pattern' '.'
>>                       # Feature reports are stored in the
>> conf/feature_report directory.
>>            'feature_report'     'village.shp.xml'
>>          END
>>          TOLERANCE 0
>>        END END ## end Map
>>
>>
>> ### report:  work well
>> ----------------------------------------------------------------
>>
>> Read from mysql , only DATA section,rest all are same
>>
>> -------------------------------------------------------------------------------
>>  CONNECTIONTYPE OGR
>>  CONNECTION "MySQL:bmaapp,user=root,password=root,port=3306"
>>  DATA "SELECT * from internal_plots  ;"
>>
>> ### report:  work well
>> ----------------------------------------------------------------
>>
>> Read from postGIS only DATA section,rest all are same
>>
>> -------------------------------------------------------------------------------
>>  CONNECTIONTYPE postgis
>>   CONNECTION 'host=localhost port=5432 dbname=postgis user=postgres
>> password=root at 2011'
>>   DATA 'the_geom from Internal_plots'
>>
>>
>> ### report:  map is not displayed
>> ---------------------------------------------------------
>>
>> please note that from pgadmin III sql query  if we give  select the_geom
>> from public."Internal_plots"  then  gives the geomtry column as output but
>> only    select the_geom from Internal_plots OR   the_geom from
>> Internal_plots    does not give output rather second one is syntax error and
>> first one is giving message that Internal_plots relation does not exist.
>>
>>
>>
>> With Thanks and best regards
>> Sanjib Chatterjee
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> postgis-devel mailing list
>> postgis-devel at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>>
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>



More information about the postgis-devel mailing list