[Qgis-developer] Native SQL Anywhere plugin+provider contributed to trunk

Dave.DeHaan at sybase.com Dave.DeHaan at sybase.com
Wed Dec 22 15:42:20 EST 2010


Hi Tim: Please see my inline responses below.

Tim Sutton <lists at linfiniti.com> wrote on 12/22/2010 03:13:49 PM:

> Hi (taking this back on list as others will benifit from your
> responses if they read the archives)
>
> On Wed, Dec 22, 2010 at 10:00 PM,  <Dave.DeHaan at sybase.com> wrote:
> > Hi Tim,
> >
> > As you discovered, you only need to specify ServerName if you are
trying to
> > distinguish between multiple database servers; otherwise the connection
> > goes to the "default" server, which is the first one that was started
on
> > the host.
> >
> > http://dcx.sybase.com/index.html#1200en/dbadmin/da-conparm.html
> >
> > In the connection setup dialog for the plugin, I've tried to use the
> > context-help to indicate when a parameter is optional ("leave blank for
> > default server on host").
> >
>
> Thanks - yes I discovered the context help when setting up the QGIS
> SQL Anywhere provider connection. I am up and running now thanks. As
> initial feedback (after playing with it for 10 mins) is that it seems
> to run without problems and do what it says on the box. The only
> hiccup I have encountered so far is that the sql loader script for
> Alaska data does not seem to run cleanly. I removed some of the shp
> layer names from the initial list as I only have alaska, lakes and
> majrivers here on my local setup. When the script ran, it dropped the
> tables based on layer names ok but trying to load the shapefiles it
> would report something like:
>
> Failed to load  '/home/timlinux/gisdata/Alaska/.shp'
>
> i.e. it was not properly concatenating in the layernams for the shp
> loader part of the script.

Hmm, that's somewhat puzzling.  I tested the script under both Windows and
Linux.  The script rather crudely assumes that the list of names built at
the top is of the form "A,B,...,Z".  Is it possible that during your
modification to restrict to alaska, lakes, and majrivers you inadvertently
introduced an extra comma into the string value (likely at the front)?

>
> Since I was eager just to see a pretty picture, I shamelessly cheated
> to get the alaska boundary and then a local EPSG:4326 based dataset to
> load by simply calling:
>
> CALL load_shapefile( '/home/timlinux/gisdata/Alaska/alaska.shp',
> 1000002964, 'QGIS_alaska' );
> CALL load_shapefile(
> '/home/timlinux/gisdata/Africa/Jozi/2628-Vector-WGS84/
> 2628_ROAD_LINE_2006_12.shp',
> 1000004326, 'QGIS_jozi_roads' );
>
> It would be interesting to run some benchmarks comparing SQL Anywhere
> with SpatialLite and PostgreSQL/PostGIS. If I have some time I will do
> some simple tests of that nature.

I'd be interested in your results.  I will take this opportunity to note,
however, that SA 12.0.0 was the first release of our spatial support.  SA
12.0.1 will be released in early 2011, and it will contain substantial
performance improvements for spatial (particularly for
loading/querying/manipulating large geometry values).  Waiting a few months
for 12.0.1 before running benchmark comparisons would be great :).

>
> Thanks for the contribution! No doubt you will start getting a trickle
> of queries as more people start to explore the new goodies :-)
>

I hope so!  At least, I hope some people try it out.  Ideally, everything
would be so straightforward and work so smoothly that very few questions
arise :-).

--Dave


> Regards
>
> Tim
>
>
> > Let me know if you encounter anything that needs clarification.
> >
> > Best regards,
> > Dave
> >
> > ----
> > David E. DeHaan
> > Query Processing team
> > Sybase iAnywhere
> >
> >
> >
> >  From:       Tim Sutton <lists at linfiniti.com>
> >
> >  To:         <Dave.DeHaan at sybase.com>
> >
> >  Cc:         <qgis-developer at lists.osgeo.org>
> >
> >  Date:       12/22/2010 02:18 PM
> >
> >  Subject:    Re: [Qgis-developer] Native SQL Anywhere plugin
> +provider contributed to trunk
> >
> >
> >
> >
> >
> >
> > Hi again
> >
> > On Wed, Dec 22, 2010 at 9:10 PM, Tim Sutton <lists at linfiniti.com>
wrote:
> >> Hi Dave
> >>
> >> Just getting around to test driving the new provider.
> >>
> >> What is the correct value for 'servername' in the dbisql gui (assuming
> >> having followed your instructions below and that the database I
> >> created is called 'gis').
> >>
> >
> > Ok I came right by doing 'start and connect', and then leaving the
> > servername blank.
> >
> > Regards
> >
> > Tim
> >
> >> Thanks
> >>
> >> Tim
> >>
> >>
> >> On Thu, Dec 16, 2010 at 12:00 AM,  <Dave.DeHaan at sybase.com> wrote:
> >>>
> >>> Hello QGIS Devs,
> >>>
> >>> As per discussion on qgis-psc a couple of weeks ago, I have just
> >>> contributed (rev. 14918) a native plugin+provider for Sybase SQL
> > Anywhere
> >>> (trunk/qgis/src/plugins/sqlanywhere;
> > trunk/qgis/src/providers/sqlanywhere),
> >>> similar in functionality to the PostGIS and SpatiaLite providers.
Due
> > to a
> >>> legal technicality, this code needed to be released under GPL v3
rather
> >>> than the usual GPL v2 used by the rest of the QGIS project.
> >>>
> >>> I've tested the code under both Ubuntu 10.04 (gcc) and Windows XP
(MSVC
> >>> 2008).  If there are developers out there on other platforms, could
you
> >>> please let me know if the plugin fails to either compile or load on
your
> >>> platform (loading it should add a toolbar button and a couple menu
> >>> options)?
> >>>
> >>> If anyone is interested in taking the plugin/provider for a test
drive,
> >>> here is a quick set of steps to get you started:
> >>>
> >>>  1. Download the free Developer's Edition of SQL Anywhere 12.0.0
here:
> >>> http://www.sybase.com/detail?id=1016644
> >>>
> >>>  2. Install the SQL Anywhere 12.0.0 engine on your database host
> >>>
> >>>  3. Install the SQL Anywhere 12.0.0 client libraries on your QGIS
client
> >>> (only necessary if client and host are different machines)
> >>>
> >>>  4. Use 'dbinit my_database_name' to initialize a blank database on
the
> >>> host.  The default user/password is initialized to 'dba'/'sql'.
> >>>
> >>>  5. Use 'dbsrv12 my_database_name' to start the database server on
the
> >>> host.
> >>>
> >>>  6. Populate the database with sample spatial data.  To facilitate
this
> >>> step, I have contributed the SQL script
> >>> src/providers/sqlanywhere/load_alaska_shapes.sql which loads the
Alaska
> >>> VMap0 shapefiles into new tables.  Use the 'Interactive SQL' tool
> > (dbisql)
> >>> on the database host to open/execute this script (you will need to
> > modify a
> >>> few variables at the top of the script to tell it where to find the
> >>> shapefiles, which are assumed to be on the filesystem of the database
> >>> host).
> >>>
> >>>  7. Start up QGIS, and load the SQL Anywhere plugin.  This will add a
> >>> button to the data sources toolbar, as well as the menu entries
> > 'Plugins->
> >>> SQL Anywhere' and 'Layer->Add SQL Anywhere Layer...'
> >>>
> >>>  8. Adding a SQL Anywhere layer should invoke a dialogue box for
> > choosing
> >>> a connection and searching the database schema for geometry columns
> >>> (similar look/feel/functionality to the PostGIS and SpatiaLite
toolbar
> >>> buttons).  If you instead receive a message box, it means that it
can't
> >>> find the SQL Anywhere client libraries installed in step 3 (or step 2
if
> >>> client=host).
> >>>
> >>> Please let me know if you have any
> > questions/comments/suggestions/bugs...
> >>>
> >>> Thanks,
> >>> Dave
> >>>
> >>> ----
> >>> David DeHaan
> >>> SQL Anywhere Research and Development
> >>> Sybase iAnywhere
> >>> ddehaan at sybase.com
> >>>
> >>> _______________________________________________
> >>> Qgis-developer mailing list
> >>> Qgis-developer at lists.osgeo.org
> >>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >>>
> >>
> >>
> >>
> >> --
> >> Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
> >> ==============================================
> >> Please do not email me off-list with technical
> >> support questions. Using the lists will gain
> >> more exposure for your issues and the knowledge
> >> surrounding your issue will be shared with all.
> >>
> >> Visit http://linfiniti.com to find out about:
> >>  * QGIS programming and support services
> >>  * Mapserver and PostGIS based hosting plans
> >>  * FOSS Consulting Services
> >> Skype: timlinux
> >> Irc: timlinux on #qgis at freenode.net
> >> ==============================================
> >>
> >
> >
> >
> > --
> > Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
> > ==============================================
> > Please do not email me off-list with technical
> > support questions. Using the lists will gain
> > more exposure for your issues and the knowledge
> > surrounding your issue will be shared with all.
> >
> > Visit http://linfiniti.com to find out about:
> >  * QGIS programming and support services
> >  * Mapserver and PostGIS based hosting plans
> >  * FOSS Consulting Services
> > Skype: timlinux
> > Irc: timlinux on #qgis at freenode.net
> > ==============================================
> >
> >
> >
> >
> >
>
>
>
> --
> Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
> ==============================================
> Please do not email me off-list with technical
> support questions. Using the lists will gain
> more exposure for your issues and the knowledge
> surrounding your issue will be shared with all.
>
> Visit http://linfiniti.com to find out about:
>  * QGIS programming and support services
>  * Mapserver and PostGIS based hosting plans
>  * FOSS Consulting Services
> Skype: timlinux
> Irc: timlinux on #qgis at freenode.net
> ==============================================
>



More information about the Qgis-developer mailing list