Unable to Display Postgis Database Table Geometry Column Points in Geomoose

المشرف العام

Administrator
طاقم الإدارة
I'm a beginner in this field.I want to plot the postgis database table geometry column in geomoose but it is showing a pink tile.Through an android device we are pushing latitude and longitude to postgis database table and we are generating a geom column which is of of projection 4326 first and then we are generating another column geom1 which is of projection 3857 and i'm pulling this column from database table to display it in geomoose.The code which we used for generating geom1 (3857 projection) is given below:

SELECT AddGeometryColumn('my_table_schema', 'my_table','geom', 4326, 'POINT',2); SELECT AddGeometryColumn('my_table_schema', 'my_table','geom1', 3857, 'POINT',2); UPDATE public.details SET geom = ST_Transform(ST_GeomFromText('POINT(' || longitude || ' ' || lattitude || ')',4326), 4326); UPDATE public.details SET geom1=ST_Transform(geom,3857)The code for mapfile is as follows:

MAP NAME 'livestock' SIZE 800 650 STATUS ON EXTENT 8558119.00 956287.69 8558151.00 956310.56 UNITS METERS INCLUDE "../../geomoose_globals.map" WEB METADATA 'ows_title' 'AHD Centres' 'ows_srs' 'EPSG:26915 EPSG:4326 EPSG:900913 EPSG:3857' 'ows_enable_request' '*' 'ows_onlineresource' 'http://www.geomoose.org' END END PROJECTION 'init=epsg:3857' END LAYER NAME 'assets' CONNECTIONTYPE postgis CONNECTION "host=\\my_hostname dbname=my_dbname user=pmy_username password=my_password port=5432" DATA "geom1 from my_tablename" STATUS ON TYPE POINT TOLERANCE 1 TOLERANCEUNITS METERS LABELITEM "ogc_fid" CLASS NAME 'assets' COLOR 0 0 0 OUTLINECOLOR 0 0 0 STYLE SYMBOL 'CIRCLE' SIZE 10 OUTLINECOLOR 204 0 51 COLOR 0 0 0 END LABEL TYPE BITMAP SIZE TINY COLOR 255 255 0 MINDISTANCE 200 PARTIALS TRUE END #end of LABEL END METADATA 'select_record' 'templates/select_result3.html' 'select_header' 'templates/select_header.html' 'identify_record' 'identifyphp.html' 'itemquery' 'search_result.html' 'itemquery-filter' '/.*[qstring].*/i' 'qstring_validation_pattern' '.' END END END ## end MapWorked with this mapfile code and got output but now it is not working.Is this the problem with code in generating geom1 or is there any error in mapfile.Thanks in advance.



أكثر...
 
أعلى