我有一個有趣的問題,我一直在努力了幾天,現在在Windows中,我得到一個空白的PNG響應,但在Linux中與幾乎相同的地圖文件,我得到了預期的輸出。我使用Apache作爲WMS服務器,在Linux中設置了MapServer,並且工作完美,但是我很遺憾需要切換到Windows和IIS。將MapServer從Apache與Apache切換到使用IIS的Windows。空白PNG響應
我有一個很小的sqlite數據庫,我試圖讓MapServer顯示一堆點。我在linux和windows中使用相同的sqlite數據庫。
這裏的Linux安裝:(工程)
ogrinfo上的SQLite數據庫:
[email protected]:/usr/lib/cgi-bin# ogrinfo CountiesAR.sqlite ArkPointGeo -summary
INFO: Open of `CountiesAR.sqlite' using driver `SQLite' successful.
Layer name: ArkPointGeo
Geometry: Unknown (any)
Feature Count: 1004
Extent: (-94.515743, 33.069850) - (-89.870035, 36.495504)
Layer SRS WKT:
(unknown)
FID Column = _rowid_
Geometry Column = GeoPoint
PK_UID: Integer (0.0)
PK_UID:1: Integer (0.0)
DocumentID: String (0.0)
Latitude: Real (0.0)
Longitude: String (0.0)
我得到預期的PNG時,我用命令運行shp2img:
shp2img -m Test.map -o test.png -all_debug 5
地圖文件:http://hastebin.com/iyerudipes.vhdl
和我用來訪問的URL:
http://www.zachatrocity.com/cgi-bin/mapserv?mode=map&map=Test.map&layer=Points
如果您按照該鏈接,您可以看到它顯示。有了這個設置,一切都按預期工作。
在Windows設置:(不工作)
ogrinfo上的SQLite數據庫:
C:\path\to\gdal-ogr>ogrinfo C:\pathto\data\CountiesAR.sqlite ArkPointGeo -summary
INFO: Open of `C:\pathto\data\CountiesAR.sqlite'
using driver `SQLite' successful.
Layer name: ArkPointGeo
Geometry: Unknown (any)
Feature Count: 1004
Extent: (-94.515743, 33.069850) - (-89.870035, 36.495504)
Layer SRS WKT:
(unknown)
FID Column = _rowid_
Geometry Column = GeoPoint
PK_UID: Integer (0.0)
PK_UID:1: Integer (0.0)
DocumentID: String (0.0)
Latitude: Real (0.0)
Longitude: String (0.0)
當我在Windows機器,我得到了我的分貝的每一個點以下運行shp2img:
msOGRFileNextShape: Rejecting feature (shapeid = 999, tileid=0) of incompatible type for this layer (feature wkbType 0, layer type 0)
注意我沒有在Linux的等效命令中出現任何錯誤。
地圖文件:http://hastebin.com/subabefuxo.vhdl
和URL我用:
http://localhost:1020/cgi-bin/mapserv.exe?mode=map&map=C:\path\to\Test.map&layer=Points
最後,調試文本:
[Thu Aug 28 09:19:31 2014].373000 CGI Request 1 on process 6584
[Thu Aug 28 09:19:31 2014].380000 msDrawMap(): rendering using outputformat named png (AGG/PNG).
[Thu Aug 28 09:19:31 2014].380000 msDrawMap(): WMS/WFS set-up and query, 0.000s
[Thu Aug 28 09:19:31 2014].404000 msDrawMap(): Layer 0 (Points), 0.024s
[Thu Aug 28 09:19:31 2014].404000 msDrawMap(): Drawing Label Cache, 0.000s
[Thu Aug 28 09:19:31 2014].404000 msDrawMap() total time: 0.031s
[Thu Aug 28 09:19:33 2014].103000 msSaveImage(stdout) total time: 1.699s
[Thu Aug 28 09:19:33 2014].104000 mapserv request processing time (loadmap not incl.): 1.732s
[Thu Aug 28 09:19:33 2014].105000 msFreeMap(): freeing map at 02A40048.
任何想法,爲什麼會在我的Linux工作服務器,但不是我的Windows?我很茫然。