P
P
Programep2018-04-13 09:29:20
PostgreSQL
Programep, 2018-04-13 09:29:20

Why does mapserver with postgis show the layer as empty?

Good afternoon!
Please tell me why the map layer in mapserver with postgis is empty.
map file code:

MAP
 EXTENT 43 32 45 34
 IMAGETYPE PNG24
 SIZE 800 600
 CONFIG "MS_ERRORFILE" "/ms4w/tmp/ms_error.txt"
 DEBUG 5

WEB
  MINSCALEDENOM 2000000
  MAXSCALEDENOM 50000000

  IMAGEPATH "/ms4w/tmp/ms_tmp/"
  IMAGEURL "/ms_tmp/"
  TEMPLATE "../htdocs/viewer-template.html"
  LOG "mapserver.log"
END

LAYER
 NAME "boundary"
 TYPE POLYGON
 CONNECTIONTYPE postgis
 CONNECTION "user=user password=password dbname=dbname host=localhost"
 DATA "geom from (select osm_id, ST_AsText( ST_FlipCoordinates( ST_Transform(way, 4326) ) ) geom
            from public.planet_osm_polygon where leisure = 'park' and name='Гагаринский сквер'
            ) using unique osm_id"
 PROJECTION
   "init=epsg:4326"
 END
 CLASS
      COLOR 200 120 123
 END
END

END

In the ms_error.txt log:
[Fri Apr 13 08:49:49 2018].174000 CGI Request 1 on process 48996
[Fri Apr 13 08:49:49 2018].178000 msDrawMap(): rendering using outputformat named png24 (AGG/ PNG).
[Fri Apr 13 08:49:49 2018].178000 msDrawMap(): WMS/WFS set-up and query, 0.000s
[Fri Apr 13 08:49:49 2018].178000 msDrawMap(): Drawing Label Cache, 0.000 s
[Fri Apr 13 08:49:49 2018].178000 msDrawMap() total time: 0.003s
[Fri Apr 13 08:49:49 2018].196000 msSaveImage(stdout) total time: 0.018s
[Fri Apr 13 08: 49:49 2018].196000 mapserv request processing time (msLoadMap not incl.): 0.022s
[Fri Apr 13 08:49:49 2018].197000 msFreeMap(): freeing map at 00EA2070.
In mapserver.log:
Fri Apr 13 08:48:57 2018,29876,10.41.208.2,MS,3,-1.000000 -1.000000 -1.000000 -1.000000,-1.000000 -1.000000,boundaries ,normal execution
Fri Apr 13 08:49:48 2018,3656,3 10.41.208.2, MS, 3, -281825.292235 -211280.774779 281913.292235 211346.774779,44.000000 33.000000, boundaries, normal execution
Fri Apr 13 08:49:48 2018,47312,10.41.208.2, MS, 3, -281825.292235 -211280.774779 281913.292235 211346.774779,44.000000 33.000000, Boundaries, Normal Execution
Fri Apr 13 08:49:49 2018,50152,0.41.208.2, MS, 3, -281825.292235 -21125.774779 281913.292235 211346.774779,44.000000 33.000000, Boundaries, Normal Execution
Fri Apr 13 08:49:49 2018 281913.292235 211346.774779.44.000000 33.000000,boundaries ,normal execution

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question