cccs-web / soc-maps

Web mapping application in support of social analysis.
6 stars 5 forks source link

trouble presenting qgis file via docker #15

Closed cccs-ip closed 9 years ago

cccs-ip commented 9 years ago

I managed to get the docker app installed (per issue #14), but I cannot see the map output file via http://localhost:6003/cgi-bin/qgis_mapserv.fcgi?map=/web/cccs_public.qgs

here's the error report from my browser:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
<ServiceException code="ServiceNotSpecified">
Service not specified. The SERVICE parameter is mandatory
</ServiceException>
</ServiceExceptionReport>

For the record, here's the output from my Docker install:

aaron@custom:~/cccs/soc-maps$ ./public_loader.sh
Checking for docker installation
---------------------------------
Upstream docker installation found, great!
Checking for gdal installation
------------------------------
GDAL found, great!
Starting docker postgis container for public data
-------------------------------------------------
cccs-postgis-public
cccs-postgis-public
109e4468df76548edbdd1ee67de5d759033dd42a1a46bc790b37d483edf1aa4c
Loading shapefiles
------------------
Loading /MTB_public/shapefiles/infra-airports_point-L3_IDN_MTB.shp
SET
SET
BEGIN
CREATE TABLE
ALTER TABLE
                            addgeometrycolumn                             
--------------------------------------------------------------------------
 public.infra-airports_point-l3_idn_mtb.geom SRID:4326 TYPE:POINT DIMS:2 
(1 row)

CREATE INDEX
COMMIT
Loading /MTB_public/shapefiles/infra-roads_line-L3_IDN_MTB.shp
SET
SET
BEGIN
CREATE TABLE
ALTER TABLE
                               addgeometrycolumn                                
--------------------------------------------------------------------------------
 public.infra-roads_line-l3_idn_mtb.geom SRID:4326 TYPE:MULTILINESTRING DIMS:2 
(1 row)

CREATE INDEX
COMMIT
Loading /MTB_public/shapefiles/infra-seports_point-L3_IDN_MTB.shp
SET
SET
BEGIN
CREATE TABLE
ALTER TABLE
                            addgeometrycolumn                            
-------------------------------------------------------------------------
 public.infra-seports_point-l3_idn_mtb.geom SRID:4326 TYPE:POINT DIMS:2 
(1 row)

CREATE INDEX
COMMIT
Loading /MTB_public/shapefiles/trans-sea-lane_line-L3_IDN_MTB.shp
SET
SET
BEGIN
CREATE TABLE
ALTER TABLE
                                 addgeometrycolumn                                 
-----------------------------------------------------------------------------------
 public.trans-sea-lane_line-l3_idn_mtb.geom SRID:4326 TYPE:MULTILINESTRING DIMS:2 
(1 row)

CREATE INDEX
COMMIT
Loading /MBD_public/shapefiles/admin_area-L3_IDN_MBD.shp
SET
SET
BEGIN
CREATE TABLE
ALTER TABLE
                           addgeometrycolumn                           
-----------------------------------------------------------------------
 public.admin_area-l3_idn_mbd.geom SRID:4326 TYPE:MULTIPOLYGON DIMS:2 
(1 row)

CREATE INDEX
COMMIT
Loading /MBD_public/shapefiles/admin_area-L4_IDN_MBD.shp
SET
SET
BEGIN
CREATE TABLE
ALTER TABLE
                           addgeometrycolumn                           
-----------------------------------------------------------------------
 public.admin_area-l4_idn_mbd.geom SRID:4326 TYPE:MULTIPOLYGON DIMS:2 
(1 row)

CREATE INDEX
COMMIT
Loading /MBD_public/shapefiles/admin_area-L5_IDN_MBD.shp
SET
SET
BEGIN
CREATE TABLE
ALTER TABLE
                           addgeometrycolumn                           
-----------------------------------------------------------------------
 public.admin_area-l5_idn_mbd.geom SRID:4326 TYPE:MULTIPOLYGON DIMS:2 
(1 row)

CREATE INDEX
COMMIT
Loading /MTB_public/shapefiles/admin_point-L5_IDN_MTB_population.shp
SET
SET
BEGIN
CREATE TABLE
ALTER TABLE
                             addgeometrycolumn                              
----------------------------------------------------------------------------
 public.admin_point-l5_idn_mtb_population.geom SRID:4326 TYPE:POINT DIMS:2 
(1 row)

CREATE INDEX
COMMIT
Running the sql file to clean the database
-------------------------------------------
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER SEQUENCE
ALTER SEQUENCE
ALTER SEQUENCE
ALTER SEQUENCE
ALTER SEQUENCE
ALTER SEQUENCE
ALTER SEQUENCE
ALTER INDEX
ALTER INDEX
ALTER INDEX
ALTER INDEX
ALTER INDEX
ALTER INDEX
ALTER INDEX
ALTER INDEX
ALTER INDEX
ALTER INDEX
ALTER INDEX
ALTER INDEX
ALTER INDEX
ALTER INDEX
ALTER INDEX
ALTER INDEX
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
Appending data to tables
------------------------
0...10...20...30...40...50...60...70...80...90...100 - done.
0...10...20...30...40...50...60...70...80...90...100 - done.
0...10...20...30...40...50...60...70...80...90...100 - done.
0...10...20...30...40...50...60...70...80...90...100 - done.
0...10...20...30...40...50...60...70...80...90...100 - done.
0...10...20...30...40...50...60...70...80...90...100 - done.
0...10...20...30...40...50...60...70...80...90...100 - done.
UPDATE 117
UPDATE 9
Running QGIS server
-------------------
Error response from daemon: No such container: cccs-qgis-server-public
2014/12/08 10:37:15 Error: failed to kill one or more containers
Error response from daemon: No such container: cccs-qgis-server-public
2014/12/08 10:37:15 Error: failed to remove one or more containers
Unable to find image 'kartoza/qgis-server' locally
Pulling repository kartoza/qgis-server
89a8fd7a418a: Download complete 
511136ea3c5a: Download complete 
525f7f68b4d8: Download complete 
51ee1e2c1534: Download complete 
85397a9a8865: Download complete 
056e3c24b400: Download complete 
b4174d40048e: Download complete 
fa7f503d8ff4: Download complete 
a363d97bcb2e: Download complete 
bd008fa4963c: Download complete 
2773b012806f: Download complete 
0f4846c641d7: Download complete 
897c9042239e: Download complete 
393339f5ded5: Download complete 
02c68132bde0: Download complete 
8ed09d419526: Download complete 
62f2cba1bedd: Download complete 
62c13cd15104: Download complete 
dd3c2233f755: Download complete 
Status: Downloaded newer image for kartoza/qgis-server:latest
b45391bc70ddf3c7a5d438c662fbeb5a5927c132a856d9ae9d766e09f878cc71
You can now consume WMS services at this url
http://localhost:6003/cgi-bin/qgis_mapserv.fcgi?map=/web/cccs_public.qgs

Out of curiosity, could my troubles be related to the two reported errors:

Error response from daemon: No such container: cccs-qgis-server-public
2014/12/08 10:37:15 Error: failed to kill one or more containers
Error response from daemon: No such container: cccs-qgis-server-public
2014/12/08 10:37:15 Error: failed to remove one or more containers
cccs-ip commented 9 years ago

It appears that the instructions about 'consume WMS services` mislead me a bit. Per the README, I am able to see the map at http://localhost:6003/index4326.html

NyakudyaA commented 9 years ago

http://localhost:6003/cgi-bin/qgis_mapserv.fcgi?map=/web/cccs_public.qgs is a wms request which you can use directly in qgis to view the map as a wms service. Also using that endpoint you can also view the map but you have to put the request correctly. We currently have two maps one in 4326 and the other in 3857

cccs-ip commented 9 years ago

Thanks for this clarification. With your guidance, I am beginning to understand how all these pieces fit together.

cccs-ip commented 9 years ago

I am closing this issue for now. I have been able to connect to the docker app for both CCCS' public and private maps. My docker app creation for 'abadi' produced a lot of feedback about missing relations, but ultimately it created the application and is displaying data. Thanks, @NyakudyaA and the rest of the Kartoza team for the guidance to get this far.

NyakudyaA commented 9 years ago

In the private we load the filegeodatabase into the database and then run a sql to clean it up which then spits out a bunch of error messages which are normal.