Tuesday, 22 December 2015

open source gis - How do I serve data in a sqlite database on a shared web host, like GoDaddy, onto a GIS web map?


I am new to the web mapping arena. I currently am managing a website and would like to add a mapping portion to it, mostly for some simple viewing and querying of a small number of layers.
For simplicity, I would like to use SQLite as the data store. I will use Quantum GIS or some such to load the spatial data into the SQLite database. Then ftp that onto the web site's directory structure.
I know that I will use OpenLayers to actually develop the map that is integrated into the web page.
I am thinking that FeatureServer would be appropriate to access the data from the SQLite database and convert it to a format that OpenLayers is able to consume. Is this correct and will it work? If so, how do I install this on a godaddy type server? If not, what would be appropriate software to use?
I would like to use Open Source software to accomplish this task.


Addtl Info - 2011/02/02 11:30AM PT To answer amercader - Yes, I can install software. I also have php and python installed, and can run CGI scrips.


To all - It seems that Django is similar to Featureserver, I guess. I seem to be stuck at where or how to go about installing these programs. I only know how to access the web site via ftp, I don't know how to access via command line. Part of my problem is not knowing the correct questions to ask to get the correct answers. - Perhaps the most direct question to ask is how do I install Featureserver on a shared hosting account like godaddy?


To underdark - a text file would be an easy solution, indeed. I would like to make this scalable for the longer term, as well as having to reduce conversion steps to get my data posted. In the future, I would potentially like to accept user input that will modify the spatial data being stored, thus making a text file a less desirable option.


Thanks all for input so far, it is appreciated.




Answer



I appreciate the input of everyone here. A number of the comments triggered thoughts and I figured out a solution. Many thanks to underdark for her comments, as they gave me some avenues to pursue.
I figured out how to install FeatureServer on a GoDaddy hosted website. Much credit goes to the FeatureServer Getting Started document.


From GoDaddy:



If your hosting account runs Hosting Configuration 2.0, server-side scripts and executables can be uploaded to any directory on your site and are not restricted to run only in the cgi directory. These scripts and executables are any files with the following extensions: .cgi, .pl, and .py.
If your hosting account does not run the new hosting configuration, all scripts and executables must reside in the cgi directory.



Using this info, I determined from the Getting Started document that I needed to add the following to my .htaccess file at the root of the website.




AddHandler cgi-script .cgi
Options +ExecCGI



I tried it in a different directory, but was having server errors, which I think was due to a conflict with the root .htaccess file.


I then extracted the full FeatureServer file which includes JSON, to my desired directory on my web server. I made the modification to the FeatureServer.cfg file as shown in the document, to specify where the temp file was going to be for the test file. Once I figured that out, and I got the path correct, I ran their test url, and it worked. Here is the link to see what the test will show if it is working correctly: FeatureServer test: GeoRSS site


I think that it is true there are many types of software that you cannot install on a shared hosting site on GoDaddy. Since FeatureServer is able to run as a CGI program, then I was able to make it work.
Now for getting some actual data up there and adding functionality. Thanks again, I'm sure I'll be back and hope I can return the favor.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...