[Qgis-user] Can not remote access PostGIS layers

Nomeneta Saili nome.saili at gmail.com
Thu Jul 28 20:05:52 PDT 2011


Hi Andreas and Matt,

Thanks for the tips. I am now able to access the layers on my PostGIS
though QGIS. It was in the end a windows firewall issue. I had to
create the inbound and outbound rules to allow TCP connection though
port 5432 on my windows firewall.

Thankyou very much for the help.

Cheers,

Nome

On Thu, Jul 28, 2011 at 2:43 AM,  <qgis-user-request at lists.osgeo.org> wrote:
> Send Qgis-user mailing list submissions to
>        qgis-user at lists.osgeo.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.osgeo.org/mailman/listinfo/qgis-user
> or, via email, send a message with subject or body 'help' to
>        qgis-user-request at lists.osgeo.org
>
> You can reach the person managing the list at
>        qgis-user-owner at lists.osgeo.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Qgis-user digest..."
>
>
> Today's Topics:
>
>   1. Virtual columns in QGIS, was: Re: [Qgis-user] object labels
>      (Andreas Neumann)
>   2. Re: Can not remote access PostGIS layers (Andreas Neumann)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 28 Jul 2011 09:43:32 +0200
> From: Andreas Neumann <a.neumann at carto.net>
> Subject: Virtual columns in QGIS, was: Re: [Qgis-user] object labels
> To: qgis-user <qgis-user at lists.osgeo.org>, Fischer J?rgen
>        <jef at norbit.de>, qgis-developer <qgis-developer at lists.osgeo.org>
> Message-ID: <dd827459d47c2875fa4bf18120979f51 at carto.net>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
>  Hi Nathan,
>
>  Good to hear that you are working on this.
>
>  I just wonder if it wouldn't make sense to have a general purpose
>  "virtual column" that could be introduced in QGIS. This would be useful
>  for:
>
>  * labeling
>  * map tips/QGIS server tooltip display
>  * symbology
>  * plugins
>  * others?
>
>  It would be convenient to use the field calculator, but instead of just
>  writing out to a physically existing column it would create a new
>  virtual column, just like a virtual column in a database view.
>
>  Otherwise one would have to develop the same functionality several
>  times - for labeling, for tooltips, etc.
>
>  Do you think it would be feasible to implement this on a lower level in
>  QGIS so that users could transparently work with virtual columns
>  wherever they want?
>
>  Andreas
>
>  On Thu, 28 Jul 2011 16:09:56 +1000, Nathan Woodrow wrote:
>> My upcoming patch that adds expression based labels will be able
>> to achieve this once it's completed;  I'm just cleaning up the UI
>> and testing everything then I will get the guys to merge it in.
>>  Until then you will need to create a new column.
>>
>> - Nathan
>>
>> On Wed, Jul 27, 2011 at 9:15 PM, Torsten Lange  wrote:
>>
>>> Ok, thank you, Andreas!
>>>
>>> Torsten
>>>
>>> Am Mittwoch 27 Juli 2011, 11:00:01 schrieb Andreas Neumann:
>>>
>>>>  Hi,
>>> >
>>> >  Currently, you have to create a new column. I usually create a
>>> view in
>>> >  Postgis for this purpose.
>>> >
>>> >  It is in on the wishlist that one can create a "virtual" column
>>> - not
>>> >  only for labeling, but also for map tips and perhaps
>>> symbolization.
>>> >  Until then you have to do it yourself.
>>> >
>>> >  Andreas
>>> >
>>> >  On Tue, 26 Jul 2011 22:51:34 +0200, Torsten Lange wrote:
>>> > > Hi,
>>> > >
>>> > > Is there a way just to print - lets say - the first four
>>> letters of a
>>> > > objects
>>> > > name? Or must I create a new row for that?
>>> > >
>>> > > Thank you, Torsten
>>> > > _______________________________________________
>>> > > Qgis-user mailing list
>>> > > Qgis-user at lists.osgeo.org [1]
>>> > > http://lists.osgeo.org/mailman/listinfo/qgis-user [2]
>>>
>>> _______________________________________________
>>> Qgis-user mailing list
>>> Qgis-user at lists.osgeo.org [3]
>>> http://lists.osgeo.org/mailman/listinfo/qgis-user [4]
>>
>>
>>
>> Links:
>> ------
>> [1] mailto:Qgis-user at lists.osgeo.org
>> [2] http://lists.osgeo.org/mailman/listinfo/qgis-user
>> [3] mailto:Qgis-user at lists.osgeo.org
>> [4] http://lists.osgeo.org/mailman/listinfo/qgis-user
>> [5] mailto:tlange at gwdg.de
>
> --
>  --
>  Andreas Neumann
>  Böschacherstrasse 10A
>  8624 Grüt (Gossau ZH)
>  Switzerland
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 28 Jul 2011 09:46:09 +0200
> From: Andreas Neumann <a.neumann at carto.net>
> Subject: Re: [Qgis-user] Can not remote access PostGIS layers
> To: <qgis-user at lists.osgeo.org>
> Message-ID: <850a3e8d7f0ccbb5a37a03d9cda1009e at carto.net>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
>  I am also pretty sure that your problems have nothing to do with QGIS,
>  but with your PostgreSQL server configuration.
>
>  Make sure you can access your PostgreSQL server from a different
>  machine with psql and pgadmin3. Once this works, it should also work
>  with QGIS.
>
>  Look at the postgresql.conf and the pg_hba.conf to enable remote
>  access. PostgreSQL has excellent documentation on how to configure for
>  remote access.
>
>  Andreas
>
>  On Thu, 28 Jul 2011 14:43:43 +1000, Matt Boyd wrote:
>> It could be a couple of things.
>> the default installation of Postgresql in a few distributions doesn't
>> allow remote access. You may need to edit the configuration files to
>> allow this. Run nmap against the host to see if the postgresql port
>> is
>> visible.
>> You haven't given much information about how your system is set up
>> but
>> try accessing the host by ip address to see if it's an error
>> resolving
>> the hostname.
>>
>> regards
>> Matt
>>
>> On Thu, Jul 28, 2011 at 6:25 AM, Nomeneta Saili
>> <nome.saili at gmail.com> wrote:
>>> Hi people,
>>>
>>> I have set up PostGIS on my server and i am able access the GIS
>>> layers
>>> posted on it using the hostname : localhost on the server itself.
>>> However when i try to access the PostGIS layer from another computer
>>> using the hostname : GIS-SERVER (Server name on our network) it
>>> can't
>>> access. A popup menu ask for credentials with an error message can
>>> not
>>> translate host name.
>>>
>>> Any help would be much appreciated.
>>>
>>> Thanks,
>>>
>>> Nome
>>>
>>>
>>>
>>> On Wed, Jul 27, 2011 at 9:24 AM,
>>>  <qgis-user-request at lists.osgeo.org> wrote:
>>>> Send Qgis-user mailing list submissions to
>>>>        qgis-user at lists.osgeo.org
>>>>
>>>> To subscribe or unsubscribe via the World Wide Web, visit
>>>>        http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>> or, via email, send a message with subject or body 'help' to
>>>>        qgis-user-request at lists.osgeo.org
>>>>
>>>> You can reach the person managing the list at
>>>>        qgis-user-owner at lists.osgeo.org
>>>>
>>>> When replying, please edit your Subject line so it is more specific
>>>> than "Re: Contents of Qgis-user digest..."
>>>>
>>>>
>>>> Today's Topics:
>>>>
>>>>   1. Re: KML to GoogleEarth (percy langa)
>>>>   2. RE: QGIS -> MySQL -> Mapserver ?? (Chris Green)
>>>>   3. RE: QGIS -> MySQL -> Mapserver ?? (Saber Razmjooei)
>>>>   4. Deleting a column from attribute table  (adamu eloji)
>>>>
>>>>
>>>>
>>>> ----------------------------------------------------------------------
>>>>
>>>> Message: 1
>>>> Date: Wed, 27 Jul 2011 15:46:11 +0200
>>>> From: percy langa <percylanga at gmail.com>
>>>> Subject: Re: [Qgis-user] KML to GoogleEarth
>>>> To: giovanni.manghi at gmail.com
>>>> Cc: qgis-user at lists.osgeo.org, Walter Ludwick <wludwick at mac.com>
>>>> Message-ID:
>>>>
>>>>  <CAF3hcU58ySkP=LvgLOuMQbFtHo9tLPUZraSJCQ-f6ffrgicq8w at mail.gmail.com>
>>>> Content-Type: text/plain; charset="iso-8859-1"
>>>>
>>>> Works for me >> Qgis 1.6 >> CRS: WGS84, EPSG:4326, 3452
>>>>
>>>> Also try saving to GPS exchange format, then open in google earth.
>>>>
>>>> Cheers!
>>>> Percy
>>>>
>>>> On Wed, Jul 27, 2011 at 3:07 PM, Giovanni Manghi
>>>> <giovanni.manghi at gmail.com>wrote:
>>>>
>>>>> Tha  probably your shapefile is missing the .prj file, so when you
>>>>> load
>>>>> it into QGIS it will probably be given the wrong CRS. Change it
>>>>> manually
>>>>> then try again "save as..." and export in WGS84.
>>>>>
>>>>> cheers
>>>>>
>>>>> -- Giovanni --
>>>>>
>>>>> On Wed, 2011-07-27 at 13:13 +0100, Walter Ludwick wrote:
>>>>> > Hey, Saber: Thanks for the quick reply and explicit
>>>>> instructions.
>>>>> >
>>>>> > It was easy to do, i gave it a try -but still the same condition
>>>>> results,
>>>>> alas (i.e. the KML saved, even using that WGS84 as CRS, is
>>>>> interpreted by
>>>>> Google Earth as a set of polygons that covers the entire globe).
>>>>> >
>>>>> > I'm going to keep flailing, trying whatever other CRS seems
>>>>> likely, but
>>>>> if there be any further ideas of things i might try, please don't
>>>>> hesitate
>>>>> to suggest!
>>>>> >
>>>>> > /w
>>>>> >
>>>>> >
>>>>> > On Jul 27, 2011, at 12:29 PM, Saber Razmjooei wrote:
>>>>> >
>>>>> > > The CRS you need is EPSG:4326
>>>>> > > To find it easily, in search section change Authority to EPSG
>>>>> and
>>>>> search
>>>>> > > for ID.
>>>>> > > Type 4326 and highlight the line from Coordinate Reference
>>>>> System:
>>>>> > > WGS84   EPSG:4326     3452
>>>>> > > Click OK.
>>>>> > >
>>>>> > >
>>>>> > >
>>>>> > >> As a complete n00b to this list -also very new to QGIS and
>>>>> GIS in
>>>>> general-
>>>>> > >> i am having a problem that is i hope trivial to solve, for
>>>>> one of you
>>>>> with
>>>>> > >> more experience!
>>>>> > >>
>>>>> > >> Essentially: to take a (vector) layer from QGIS and "save
>>>>> as..." KML,
>>>>> if i
>>>>> > >> pass that dialog with defaults selected, i get a .KML file
>>>>> that
>>>>> doesn't
>>>>> > >> make much sense to Google Earth -that is to say, Google Earth
>>>>> can read
>>>>> and
>>>>> > >> will display the polygons, perhaps even in the right shape,
>>>>> tho i
>>>>> cannot
>>>>> > >> be sure about that, because they display as lines that pretty
>>>>> much
>>>>> cover
>>>>> > >> the entire globe!
>>>>> > >>
>>>>> > >> The one thing i can see that i think might be related to this
>>>>> problem
>>>>> is,
>>>>> > >> the CRS (Co-ordinate Reference System) parameter, which
>>>>> appears in the
>>>>> > >> "Save as..." dialog box with "Original CRS" as the default
>>>>> parameter...
>>>>> > >> but then when i push the "browse" button, i am faced with an
>>>>> immense
>>>>> > >> number of possibilities from which to choose, about which i
>>>>> have no
>>>>> idea.
>>>>> > >>
>>>>> > >> Can anyone shed some light, and perhaps suggest a CRS that
>>>>> just might
>>>>> > >> work? The geography i am trying to describe is in coastal
>>>>> Portugal, if
>>>>> > >> that makes any difference...       /w
>>>>> > >>
>>>>> > >>
>>>>> > >> _______________________________________________
>>>>> > >> Qgis-user mailing list
>>>>> > >> Qgis-user at lists.osgeo.org
>>>>> > >> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>> > >>
>>>>> > >
>>>>> > >
>>>>> >
>>>>> > _______________________________________________
>>>>> > Qgis-user mailing list
>>>>> > Qgis-user at lists.osgeo.org
>>>>> > http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Qgis-user mailing list
>>>>> Qgis-user at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>>
>>>> -------------- next part --------------
>>>> An HTML attachment was scrubbed...
>>>> URL:
>>>> http://lists.osgeo.org/pipermail/qgis-user/attachments/20110727/d7dd885f/attachment-0001.html
>>>>
>>>> ------------------------------
>>>>
>>>> Message: 2
>>>> Date: Wed, 27 Jul 2011 14:50:37 +0100
>>>> From: "Chris Green" <chris.green at ibstv.co.uk>
>>>> Subject: RE: [Qgis-user] QGIS -> MySQL -> Mapserver ??
>>>> To: "'Saber Razmjooei'" <razmjooeis at faunalia.co.uk>
>>>> Cc: qgis-user at lists.osgeo.org
>>>> Message-ID: <039301cc4c64$31fc9860$95f5c920$@green at ibstv.co.uk>
>>>> Content-Type: text/plain;       charset="us-ascii"
>>>>
>>>> Saber
>>>>
>>>> Ogrinfo -summary on the MySQL table as saved by QGIS says:
>>>>
>>>> Layer name:      geom_test
>>>> Geometry: Unknown (any)
>>>> Feature Count: 0
>>>> Layer SRS WKT:
>>>> (unknown)
>>>> FID Column = id
>>>> Geometry Column = Geometry
>>>>
>>>>
>>>> Ogrinfo -summary on the table after running SELECT AsWKB(Geometry)
>>>> says:
>>>>
>>>> Layer name:      geom_test_converted
>>>> Geometry: Unknown (any)
>>>> Feature Count: 34
>>>> Layer SRS WKT:
>>>> (unknown)
>>>> FID Column = id
>>>> Geometry Column = Geometry
>>>>
>>>> There is no projection in the layer, QGIS seems to assume that it
>>>> is lat/lon
>>>> and then reprojects it to 900913, which is what I am using overall.
>>>>
>>>> Maybe the lack of projection in the data is confusing OGR....but
>>>> I'm not
>>>> sure that if I apply projection to the layer via QGIS, it will get
>>>> saved as
>>>> part of the MySQL data??
>>>>
>>>>
>>>> Chris
>>>>
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Saber Razmjooei [mailto:razmjooeis at faunalia.co.uk]
>>>> Sent: 27 July 2011 14:04
>>>> To: Chris Green
>>>> Cc: qgis-user at lists.osgeo.org
>>>> Subject: RE: [Qgis-user] QGIS -> MySQL -> Mapserver ??
>>>>
>>>> What does ogrinfo -al say about your geometry? Are those numbers
>>>> located
>>>> in the right place? Just to make sure your layer projection is set
>>>> properly.
>>>>
>>>>
>>>>> Hi Saber
>>>>>
>>>>> I tried that, and the when the MySQL data is saved as an ESRI
>>>>> shapefile
>>>>> the shapefile opens correctly.
>>>>>
>>>>> I have been experimenting with converting the MySQL BLOB data. For
>>>>> example
>>>>> if I try
>>>>>
>>>>> SELECT AsText(Geometry) I get a line string which looks OK and
>>>>> could be
>>>>> used to create a line feature in MapServer using PHP Mapscript.
>>>>> Then when
>>>>> I try:
>>>>>
>>>>> SELECT AsWKB(Geometry) I get a new set of BLOBs which can be
>>>>> recognised by
>>>>> OGRinfo as features (progress!!!) but still not displayed by
>>>>> MapServer.
>>>>>
>>>>> My conclusion is that QGIS is using some internal format to store
>>>>> MySQL
>>>>> linestrings which is not properly understood by OGR.
>>>>>
>>>>> Any idea where I could find out any more on this?
>>>>>
>>>>>
>>>>> Chris
>>>>>
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Saber [mailto:razmjooeis at faunalia.co.uk]
>>>>> Sent: 27 July 2011 10:55
>>>>> To: Chris Green
>>>>> Cc: qgis-user at lists.osgeo.org
>>>>> Subject: RE: [Qgis-user] QGIS -> MySQL -> Mapserver ??
>>>>>
>>>>> As a test, worth converting the mysql vector to shapefile to see
>>>>> if the
>>>>> vector is shown properly.
>>>>>
>>>>> Also checking webserver logs report for mapsever requests of the
>>>>> MySQL
>>>>> vector might help.
>>>>>
>>>>> Chris Green <chris.green at ibstv.co.uk> wrote:
>>>>>
>>>>>>Hi Saber
>>>>>>
>>>>>>
>>>>>>
>>>>>>Thanks for the suggestion. When I run ogrinfo -formats I see that
>>>>>> MySQL
>>>>>> is
>>>>>>included, so that is not the problem.
>>>>>>
>>>>>>It seems that the issue is about the way that I created and store
>>>>>> the
>>>>>> line
>>>>>>data, because I have tried with some point data and I don't have
>>>>>> this
>>>>>>problem - I can create, save, and display points with QGIS and
>>>>>> then both
>>>>>> OGR
>>>>>>and MapServer are OK. But with line data it is different.
>>>>>>
>>>>>>
>>>>>>
>>>>>>I can only assume that QGIS is sending the line data to MySQL in a
>>>>>> format
>>>>>>that QGIS recognises when the data is retrieved, but which is not
>>>>>> recognised
>>>>>>by OGR / MapServer.
>>>>>>
>>>>>>
>>>>>>
>>>>>>Going to PostGIS would have to be a last resort, I have a lot of
>>>>>> effort
>>>>>>invested in MySQL ..
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>Chris
>>>>>>
>>>>>>
>>>>>>
>>>>>>From: Saber Razmjooei [mailto:razmjooeis at faunalia.co.uk]
>>>>>>Sent: 27 July 2011 09:35
>>>>>>To: Chris Green
>>>>>>Cc: qgis-user at lists.osgeo.org
>>>>>>Subject: Re: [Qgis-user] QGIS -> MySQL -> Mapserver ??
>>>>>>
>>>>>>
>>>>>>
>>>>>>Chris
>>>>>>
>>>>>>I presume your ogr can handle mysql if you can open it in QGIS.
>>>>>> But to
>>>>>>confirm could you run:
>>>>>>
>>>>>>ogrinfo --formats
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>from terminal and check if you have
>>>>>>
>>>>>>-> "MSSQLSpatial" (read/write)
>>>>>>
>>>>>>Is your database large? Have you considered using PostGIS?
>>>>>>
>>>>>>Cheers
>>>>>>Saber
>>>>>>
>>>>>>
>>>>>>On 27/07/11 07:45, Chris Green wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>Hi QGIS users
>>>>>>
>>>>>>
>>>>>>
>>>>>>I have a problem getting Mapserver to display vector line features
>>>>>> which
>>>>>> I
>>>>>>created with QGIS and saved as spatial objects in MySQL...I asked
>>>>>> for
>>>>>> some
>>>>>>advice on this from the Mapserver forum yesterday but had no
>>>>>> responses,
>>>>>>perhaps someone in this forum has some experience to offer?
>>>>>>
>>>>>>
>>>>>>
>>>>>>As explained in the question below, I can create line features in
>>>>>> QGIS,
>>>>>> save
>>>>>>them in a MySQL table, and recall and display them with QGIS
>>>>>> without any
>>>>>>problem.  But the same features do not appear to be recognised by
>>>>>> OGRInfo
>>>>>> or
>>>>>>by Mapserver. The line features are saved as BLOB data in a MySQL
>>>>>>  MyISAM
>>>>>>table in a column which is defined as type 'geometry'. MySQL can
>>>>>> create a
>>>>>>spatial index of these features.
>>>>>>
>>>>>>
>>>>>>
>>>>>>The table is accessed by QGIS as a database layer via the 'Add
>>>>>> Vector
>>>>>> Layer'
>>>>>>dialogue. I am using QGIS 1.7.
>>>>>>
>>>>>>
>>>>>>
>>>>>>It's not really a QGIS problem, but I spent all day wrestling with
>>>>>> this
>>>>>>yesterday but have not solved it.  Any suggestions?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>Chris
>>>>>>
>>>>>>
>>>>>>
>>>>>>##########################################################################
>>>> ##
>>>>>>###
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>I'm having some trouble with an OGR connection to a MySQL
>>>>>> database. The
>>>>>> data
>>>>>>I'm trying to access was created using QGIS as a line layer and
>>>>>> saved in
>>>>>> a
>>>>>>MySQL table as a BLOB in a geometry column. I can access and
>>>>>> properly
>>>>>>display this line data using QGIS, but not so far via Mapserver -
>>>>>> nothing
>>>>>> is
>>>>>>drawn and I can't see any error.
>>>>>>
>>>>>>
>>>>>>
>>>>>>I am using Mapserver 6.0 and my mapfile is very similar to the
>>>>>> example in
>>>>>>theMapserver / MYSQL  documentation:
>>>>>>
>>>>>>
>>>>>>
>>>>>>LAYER
>>>>>>
>>>>>>       NAME "testLine"
>>>>>>
>>>>>>       TYPE   LINE
>>>>>>
>>>>>>       STATUS  DEFAULT
>>>>>>
>>>>>>       CONNECTIONTYPE  OGR
>>>>>>
>>>>>>       CONNECTION
>>>>>>  "mysql:testDB,user=admin,password=password,port=3306"
>>>>>>
>>>>>>       DATA "SELECT Geometry from testLine"
>>>>>>
>>>>>>       CLASS
>>>>>>
>>>>>>              STYLE
>>>>>>
>>>>>>                     COLOR  0 0 0
>>>>>>
>>>>>>                     WIDTH  2
>>>>>>
>>>>>>              END # style
>>>>>>
>>>>>>       END # class
>>>>>>
>>>>>>END # layer
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>If I look at the MySQL table using OGRinfo I see the following:
>>>>>>
>>>>>>
>>>>>>
>>>>>>Layer name: testLine
>>>>>>
>>>>>>Geometry: Unknown (any)
>>>>>>
>>>>>>Feature Count: 0
>>>>>>
>>>>>>Layer SRS WKT:
>>>>>>
>>>>>>(unknown)
>>>>>>
>>>>>>FID Coumn = id
>>>>>>
>>>>>>Geometry Column = Geometry
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>The issue seems to be that OGRInfo and therefore MapServer does
>>>>>> not
>>>>>>recognise any features in the table, but QGIS using access to the
>>>>>> same
>>>>>> table
>>>>>>finds and displays the features.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>Anyone have any ideas what I am doing wrong?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>Chris
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>_______________________________________________
>>>>>>Qgis-user mailing list
>>>>>>Qgis-user at lists.osgeo.org
>>>>>>http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------
>>>>
>>>> Message: 3
>>>> Date: Wed, 27 Jul 2011 15:03:32 +0100
>>>> From: "Saber Razmjooei" <razmjooeis at faunalia.co.uk>
>>>> Subject: RE: [Qgis-user] QGIS -> MySQL -> Mapserver ??
>>>> To: "Chris Green" <chris.green at ibstv.co.uk>
>>>> Cc: qgis-user at lists.osgeo.org
>>>> Message-ID:
>>>>
>>>>  <8f1479b5016f16ec694cce8d304c9e5e.squirrel at www.webmail.lutraconsulting.co.uk>
>>>>
>>>> Content-Type: text/plain;charset=iso-8859-1
>>>>
>>>> Chris
>>>> Have you checked this:
>>>>
>>>> 18.4.2.1. Creating Geometry Values Using WKT Functions
>>>> http://www.qijoo.com/FAPM/mysql/5.1/MySQL_51_en/ch18s04.html
>>>>
>>>> You can optionally use SRID in your query.
>>>> I am a bit out of my depth now as I have never used mysql spatial.
>>>>
>>>>
>>>> Hope that helps
>>>> Saber
>>>>
>>>>
>>>>> Saber
>>>>>
>>>>> Ogrinfo -summary on the MySQL table as saved by QGIS says:
>>>>>
>>>>> Layer name:    geom_test
>>>>> Geometry: Unknown (any)
>>>>> Feature Count: 0
>>>>> Layer SRS WKT:
>>>>> (unknown)
>>>>> FID Column = id
>>>>> Geometry Column = Geometry
>>>>>
>>>>>
>>>>> Ogrinfo -summary on the table after running SELECT AsWKB(Geometry)
>>>>> says:
>>>>>
>>>>> Layer name:    geom_test_converted
>>>>> Geometry: Unknown (any)
>>>>> Feature Count: 34
>>>>> Layer SRS WKT:
>>>>> (unknown)
>>>>> FID Column = id
>>>>> Geometry Column = Geometry
>>>>>
>>>>> There is no projection in the layer, QGIS seems to assume that it
>>>>> is
>>>>> lat/lon
>>>>> and then reprojects it to 900913, which is what I am using
>>>>> overall.
>>>>>
>>>>> Maybe the lack of projection in the data is confusing OGR....but
>>>>> I'm not
>>>>> sure that if I apply projection to the layer via QGIS, it will get
>>>>> saved
>>>>> as
>>>>> part of the MySQL data??
>>>>>
>>>>>
>>>>> Chris
>>>>>
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Saber Razmjooei [mailto:razmjooeis at faunalia.co.uk]
>>>>> Sent: 27 July 2011 14:04
>>>>> To: Chris Green
>>>>> Cc: qgis-user at lists.osgeo.org
>>>>> Subject: RE: [Qgis-user] QGIS -> MySQL -> Mapserver ??
>>>>>
>>>>> What does ogrinfo -al say about your geometry? Are those numbers
>>>>> located
>>>>> in the right place? Just to make sure your layer projection is set
>>>>> properly.
>>>>>
>>>>>
>>>>>> Hi Saber
>>>>>>
>>>>>> I tried that, and the when the MySQL data is saved as an ESRI
>>>>>> shapefile
>>>>>> the shapefile opens correctly.
>>>>>>
>>>>>> I have been experimenting with converting the MySQL BLOB data.
>>>>>> For
>>>>>> example
>>>>>> if I try
>>>>>>
>>>>>> SELECT AsText(Geometry) I get a line string which looks OK and
>>>>>> could be
>>>>>> used to create a line feature in MapServer using PHP Mapscript.
>>>>>> Then
>>>>>> when
>>>>>> I try:
>>>>>>
>>>>>> SELECT AsWKB(Geometry) I get a new set of BLOBs which can be
>>>>>> recognised
>>>>>> by
>>>>>> OGRinfo as features (progress!!!) but still not displayed by
>>>>>> MapServer.
>>>>>>
>>>>>> My conclusion is that QGIS is using some internal format to store
>>>>>> MySQL
>>>>>> linestrings which is not properly understood by OGR.
>>>>>>
>>>>>> Any idea where I could find out any more on this?
>>>>>>
>>>>>>
>>>>>> Chris
>>>>>>
>>>>>>
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Saber [mailto:razmjooeis at faunalia.co.uk]
>>>>>> Sent: 27 July 2011 10:55
>>>>>> To: Chris Green
>>>>>> Cc: qgis-user at lists.osgeo.org
>>>>>> Subject: RE: [Qgis-user] QGIS -> MySQL -> Mapserver ??
>>>>>>
>>>>>> As a test, worth converting the mysql vector to shapefile to see
>>>>>> if the
>>>>>> vector is shown properly.
>>>>>>
>>>>>> Also checking webserver logs report for mapsever requests of the
>>>>>> MySQL
>>>>>> vector might help.
>>>>>>
>>>>>> Chris Green <chris.green at ibstv.co.uk> wrote:
>>>>>>
>>>>>>>Hi Saber
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>Thanks for the suggestion. When I run ogrinfo -formats I see that
>>>>>>> MySQL
>>>>>>> is
>>>>>>>included, so that is not the problem.
>>>>>>>
>>>>>>>It seems that the issue is about the way that I created and store
>>>>>>> the
>>>>>>> line
>>>>>>>data, because I have tried with some point data and I don't have
>>>>>>> this
>>>>>>>problem - I can create, save, and display points with QGIS and
>>>>>>> then both
>>>>>>> OGR
>>>>>>>and MapServer are OK. But with line data it is different.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>I can only assume that QGIS is sending the line data to MySQL in
>>>>>>> a
>>>>>>> format
>>>>>>>that QGIS recognises when the data is retrieved, but which is not
>>>>>>> recognised
>>>>>>>by OGR / MapServer.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>Going to PostGIS would have to be a last resort, I have a lot of
>>>>>>> effort
>>>>>>>invested in MySQL ..
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>Chris
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>From: Saber Razmjooei [mailto:razmjooeis at faunalia.co.uk]
>>>>>>>Sent: 27 July 2011 09:35
>>>>>>>To: Chris Green
>>>>>>>Cc: qgis-user at lists.osgeo.org
>>>>>>>Subject: Re: [Qgis-user] QGIS -> MySQL -> Mapserver ??
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>Chris
>>>>>>>
>>>>>>>I presume your ogr can handle mysql if you can open it in QGIS.
>>>>>>> But to
>>>>>>>confirm could you run:
>>>>>>>
>>>>>>>ogrinfo --formats
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>from terminal and check if you have
>>>>>>>
>>>>>>>-> "MSSQLSpatial" (read/write)
>>>>>>>
>>>>>>>Is your database large? Have you considered using PostGIS?
>>>>>>>
>>>>>>>Cheers
>>>>>>>Saber
>>>>>>>
>>>>>>>
>>>>>>>On 27/07/11 07:45, Chris Green wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>Hi QGIS users
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>I have a problem getting Mapserver to display vector line
>>>>>>> features which
>>>>>>> I
>>>>>>>created with QGIS and saved as spatial objects in MySQL...I asked
>>>>>>> for
>>>>>>> some
>>>>>>>advice on this from the Mapserver forum yesterday but had no
>>>>>>> responses,
>>>>>>>perhaps someone in this forum has some experience to offer?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>As explained in the question below, I can create line features in
>>>>>>> QGIS,
>>>>>>> save
>>>>>>>them in a MySQL table, and recall and display them with QGIS
>>>>>>> without any
>>>>>>>problem.  But the same features do not appear to be recognised by
>>>>>>> OGRInfo
>>>>>>> or
>>>>>>>by Mapserver. The line features are saved as BLOB data in a MySQL
>>>>>>> MyISAM
>>>>>>>table in a column which is defined as type 'geometry'. MySQL can
>>>>>>> create
>>>>>>> a
>>>>>>>spatial index of these features.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>The table is accessed by QGIS as a database layer via the 'Add
>>>>>>> Vector
>>>>>>> Layer'
>>>>>>>dialogue. I am using QGIS 1.7.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>It's not really a QGIS problem, but I spent all day wrestling
>>>>>>> with this
>>>>>>>yesterday but have not solved it.  Any suggestions?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>Chris
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>##########################################################################
>>>>> ##
>>>>>>>###
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>I'm having some trouble with an OGR connection to a MySQL
>>>>>>> database. The
>>>>>>> data
>>>>>>>I'm trying to access was created using QGIS as a line layer and
>>>>>>> saved in
>>>>>>> a
>>>>>>>MySQL table as a BLOB in a geometry column. I can access and
>>>>>>> properly
>>>>>>>display this line data using QGIS, but not so far via Mapserver -
>>>>>>> nothing
>>>>>>> is
>>>>>>>drawn and I can't see any error.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>I am using Mapserver 6.0 and my mapfile is very similar to the
>>>>>>> example
>>>>>>> in
>>>>>>>theMapserver / MYSQL  documentation:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>LAYER
>>>>>>>
>>>>>>>       NAME "testLine"
>>>>>>>
>>>>>>>       TYPE   LINE
>>>>>>>
>>>>>>>       STATUS  DEFAULT
>>>>>>>
>>>>>>>       CONNECTIONTYPE  OGR
>>>>>>>
>>>>>>>       CONNECTION
>>>>>>>  "mysql:testDB,user=admin,password=password,port=3306"
>>>>>>>
>>>>>>>       DATA "SELECT Geometry from testLine"
>>>>>>>
>>>>>>>       CLASS
>>>>>>>
>>>>>>>              STYLE
>>>>>>>
>>>>>>>                     COLOR  0 0 0
>>>>>>>
>>>>>>>                     WIDTH  2
>>>>>>>
>>>>>>>              END # style
>>>>>>>
>>>>>>>       END # class
>>>>>>>
>>>>>>>END # layer
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>If I look at the MySQL table using OGRinfo I see the following:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>Layer name: testLine
>>>>>>>
>>>>>>>Geometry: Unknown (any)
>>>>>>>
>>>>>>>Feature Count: 0
>>>>>>>
>>>>>>>Layer SRS WKT:
>>>>>>>
>>>>>>>(unknown)
>>>>>>>
>>>>>>>FID Coumn = id
>>>>>>>
>>>>>>>Geometry Column = Geometry
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>The issue seems to be that OGRInfo and therefore MapServer does
>>>>>>> not
>>>>>>>recognise any features in the table, but QGIS using access to the
>>>>>>> same
>>>>>>> table
>>>>>>>finds and displays the features.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>Anyone have any ideas what I am doing wrong?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>Chris
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>_______________________________________________
>>>>>>>Qgis-user mailing list
>>>>>>>Qgis-user at lists.osgeo.org
>>>>>>>http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------
>>>>
>>>> Message: 4
>>>> Date: Wed, 27 Jul 2011 08:19:23 -0700 (PDT)
>>>> From: adamu eloji <aeloji60 at yahoo.com>
>>>> Subject: [Qgis-user] Deleting a column from attribute table
>>>> To: qgis-user at lists.osgeo.org
>>>> Message-ID:
>>>>
>>>>  <1311779963.99219.YahooMailClassic at web114719.mail.gq1.yahoo.com>
>>>> Content-Type: text/plain; charset="iso-8859-1"
>>>>
>>>>
>>>>
>>>> Dear All,
>>>>
>>>>             As a novice in QGIS, i created a column on an attribute
>>>> which i dont want any more, pls can any experience person tell me how
>>>> to delete the column.
>>>> Thanks
>>>> El-Oji
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --- On Wed, 7/27/11, qgis-user-request at lists.osgeo.org
>>>> <qgis-user-request at lists.osgeo.org> wrote:
>>>>
>>>>
>>>> From: qgis-user-request at lists.osgeo.org
>>>> <qgis-user-request at lists.osgeo.org>
>>>> Subject: Qgis-user Digest, Vol 65, Issue 61
>>>> To: qgis-user at lists.osgeo.org
>>>> Date: Wednesday, July 27, 2011, 11:14 AM
>>>>
>>>>
>>>> Send Qgis-user mailing list submissions to
>>>>     qgis-user at lists.osgeo.org
>>>>
>>>> To subscribe or unsubscribe via the World Wide Web, visit
>>>>     http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>> or, via email, send a message with subject or body 'help' to
>>>>     qgis-user-request at lists.osgeo.org
>>>>
>>>> You can reach the person managing the list at
>>>>     qgis-user-owner at lists.osgeo.org
>>>>
>>>> When replying, please edit your Subject line so it is more specific
>>>> than "Re: Contents of Qgis-user digest..."
>>>>
>>>>
>>>> Today's Topics:
>>>>
>>>>    1. Re: object labels (Andreas Neumann)
>>>>    2. RE: QGIS -> MySQL -> Mapserver ?? (Chris Green)
>>>>    3. RE: QGIS -> MySQL -> Mapserver ?? (Saber)
>>>>    4. DTclassifier is released (Maxim Dubinin)
>>>>
>>>>
>>>>
>>>> ----------------------------------------------------------------------
>>>>
>>>> Message: 1
>>>> Date: Wed, 27 Jul 2011 11:00:01 +0200
>>>> From: Andreas Neumann <a.neumann at carto.net>
>>>> Subject: Re: [Qgis-user] object labels
>>>> To: <qgis-user at lists.osgeo.org>
>>>> Message-ID: <2634cc5e1e8f0d3a1c3ecba07210ba79 at carto.net>
>>>> Content-Type: text/plain; charset=UTF-8; format=flowed
>>>>
>>>> Hi,
>>>>
>>>> Currently, you have to create a new column. I usually create a view
>>>> in
>>>> Postgis for this purpose.
>>>>
>>>> It is in on the wishlist that one can create a "virtual" column -
>>>> not
>>>> only for labeling, but also for map tips and perhaps symbolization.
>>>> Until then you have to do it yourself.
>>>>
>>>> Andreas
>>>>
>>>> On Tue, 26 Jul 2011 22:51:34 +0200, Torsten Lange wrote:
>>>>> Hi,
>>>>>
>>>>> Is there a way just to print - lets say - the first four letters
>>>>> of a
>>>>> objects
>>>>> name? Or must I create a new row for that?
>>>>>
>>>>> Thank you, Torsten
>>>>> _______________________________________________
>>>>> Qgis-user mailing list
>>>>> Qgis-user at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>
>>>> --
>>>> --
>>>> Andreas Neumann
>>>> Böschacherstrasse 10A
>>>> 8624 Grüt (Gossau ZH)
>>>> Switzerland
>>>>
>>>>
>>>> ------------------------------
>>>>
>>>> Message: 2
>>>> Date: Wed, 27 Jul 2011 10:00:27 +0100
>>>> From: "Chris Green" <chris.green at ibstv.co.uk>
>>>> Subject: RE: [Qgis-user] QGIS -> MySQL -> Mapserver ??
>>>> To: "'Saber Razmjooei'" <razmjooeis at faunalia.co.uk>
>>>> Cc: qgis-user at lists.osgeo.org
>>>> Message-ID: <02a401cc4c3b$a25fa3a0$e71eeae0$@green at ibstv.co.uk>
>>>> Content-Type: text/plain; charset="us-ascii"
>>>>
>>>> Hi Saber
>>>>
>>>>
>>>>
>>>> Thanks for the suggestion. When I run ogrinfo -formats I see that
>>>> MySQL is
>>>> included, so that is not the problem.
>>>>
>>>> It seems that the issue is about the way that I created and store
>>>> the line
>>>> data, because I have tried with some point data and I don't have
>>>> this
>>>> problem - I can create, save, and display points with QGIS and then
>>>> both OGR
>>>> and MapServer are OK. But with line data it is different.
>>>>
>>>>
>>>>
>>>> I can only assume that QGIS is sending the line data to MySQL in a
>>>> format
>>>> that QGIS recognises when the data is retrieved, but which is not
>>>> recognised
>>>> by OGR / MapServer.
>>>>
>>>>
>>>>
>>>> Going to PostGIS would have to be a last resort, I have a lot of
>>>> effort
>>>> invested in MySQL ..
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Chris
>>>>
>>>>
>>>>
>>>> From: Saber Razmjooei [mailto:razmjooeis at faunalia.co.uk]
>>>> Sent: 27 July 2011 09:35
>>>> To: Chris Green
>>>> Cc: qgis-user at lists.osgeo.org
>>>> Subject: Re: [Qgis-user] QGIS -> MySQL -> Mapserver ??
>>>>
>>>>
>>>>
>>>> Chris
>>>>
>>>> I presume your ogr can handle mysql if you can open it in QGIS. But
>>>> to
>>>> confirm could you run:
>>>>
>>>> ogrinfo --formats
>>>>
>>>>
>>>>
>>>>
>>>> from terminal and check if you have
>>>>
>>>> -> "MSSQLSpatial" (read/write)
>>>>
>>>> Is your database large? Have you considered using PostGIS?
>>>>
>>>> Cheers
>>>> Saber
>>>>
>>>>
>>>> On 27/07/11 07:45, Chris Green wrote:
>>>>
>>>>
>>>>
>>>> Hi QGIS users
>>>>
>>>>
>>>>
>>>> I have a problem getting Mapserver to display vector line features
>>>> which I
>>>> created with QGIS and saved as spatial objects in MySQL...I asked
>>>> for some
>>>> advice on this from the Mapserver forum yesterday but had no
>>>> responses,
>>>> perhaps someone in this forum has some experience to offer?
>>>>
>>>>
>>>>
>>>> As explained in the question below, I can create line features in
>>>> QGIS, save
>>>> them in a MySQL table, and recall and display them with QGIS
>>>> without any
>>>> problem.  But the same features do not appear to be recognised by
>>>> OGRInfo or
>>>> by Mapserver. The line features are saved as BLOB data in a MySQL
>>>> MyISAM
>>>> table in a column which is defined as type 'geometry'. MySQL can
>>>> create a
>>>> spatial index of these features.
>>>>
>>>>
>>>>
>>>> The table is accessed by QGIS as a database layer via the 'Add
>>>> Vector Layer'
>>>> dialogue. I am using QGIS 1.7.
>>>>
>>>>
>>>>
>>>> It's not really a QGIS problem, but I spent all day wrestling with
>>>> this
>>>> yesterday but have not solved it.  Any suggestions?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Chris
>>>>
>>>>
>>>>
>>>>
>>>> ############################################################################
>>>> ###
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> I'm having some trouble with an OGR connection to a MySQL database.
>>>> The data
>>>> I'm trying to access was created using QGIS as a line layer and
>>>> saved in a
>>>> MySQL table as a BLOB in a geometry column. I can access and
>>>> properly
>>>> display this line data using QGIS, but not so far via Mapserver -
>>>> nothing is
>>>> drawn and I can't see any error.
>>>>
>>>>
>>>>
>>>> I am using Mapserver 6.0 and my mapfile is very similar to the
>>>> example in
>>>> theMapserver / MYSQL  documentation:
>>>>
>>>>
>>>>
>>>> LAYER
>>>>
>>>>        NAME "testLine"
>>>>
>>>>        TYPE   LINE
>>>>
>>>>        STATUS  DEFAULT
>>>>
>>>>        CONNECTIONTYPE  OGR
>>>>
>>>>        CONNECTION
>>>> "mysql:testDB,user=admin,password=password,port=3306"
>>>>
>>>>        DATA "SELECT Geometry from testLine"
>>>>
>>>>        CLASS
>>>>
>>>>               STYLE
>>>>
>>>>                      COLOR  0 0 0
>>>>
>>>>                      WIDTH  2
>>>>
>>>>               END # style
>>>>
>>>>        END # class
>>>>
>>>> END # layer
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> If I look at the MySQL table using OGRinfo I see the following:
>>>>
>>>>
>>>>
>>>> Layer name: testLine
>>>>
>>>> Geometry: Unknown (any)
>>>>
>>>> Feature Count: 0
>>>>
>>>> Layer SRS WKT:
>>>>
>>>> (unknown)
>>>>
>>>> FID Coumn = id
>>>>
>>>> Geometry Column = Geometry
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> The issue seems to be that OGRInfo and therefore MapServer does not
>>>> recognise any features in the table, but QGIS using access to the
>>>> same table
>>>> finds and displays the features.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Anyone have any ideas what I am doing wrong?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Chris
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Qgis-user mailing list
>>>> Qgis-user at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>
>>>>
>>>>
>>>> -------------- next part --------------
>>>> An HTML attachment was scrubbed...
>>>> URL:
>>>> http://lists.osgeo.org/pipermail/qgis-user/attachments/20110727/414a5aee/attachment-0001.html
>>>>
>>>> ------------------------------
>>>>
>>>> Message: 3
>>>> Date: Wed, 27 Jul 2011 10:55:20 +0100
>>>> From: Saber <razmjooeis at faunalia.co.uk>
>>>> Subject: RE: [Qgis-user] QGIS -> MySQL -> Mapserver ??
>>>> To: Chris Green <chris.green at ibstv.co.uk>
>>>> Cc: qgis-user at lists.osgeo.org
>>>> Message-ID:
>>>> <05cdp715sy1xrat8ywciguee.1311760349356 at email.android.com>
>>>> Content-Type: text/plain; charset=utf-8
>>>>
>>>> As a test, worth converting the mysql vector to shapefile to see if
>>>> the vector is shown properly.
>>>>
>>>> Also checking webserver logs report for mapsever requests of the
>>>> MySQL vector might help.
>>>>
>>>> Chris Green <chris.green at ibstv.co.uk> wrote:
>>>>
>>>>>Hi Saber
>>>>>
>>>>>
>>>>>
>>>>>Thanks for the suggestion. When I run ogrinfo -formats I see that
>>>>> MySQL is
>>>>>included, so that is not the problem.
>>>>>
>>>>>It seems that the issue is about the way that I created and store
>>>>> the line
>>>>>data, because I have tried with some point data and I don't have
>>>>> this
>>>>>problem - I can create, save, and display points with QGIS and then
>>>>> both OGR
>>>>>and MapServer are OK. But with line data it is different.
>>>>>
>>>>>
>>>>>
>>>>>I can only assume that QGIS is sending the line data to MySQL in a
>>>>> format
>>>>>that QGIS recognises when the data is retrieved, but which is not
>>>>> recognised
>>>>>by OGR / MapServer.
>>>>>
>>>>>
>>>>>
>>>>>Going to PostGIS would have to be a last resort, I have a lot of
>>>>> effort
>>>>>invested in MySQL ..
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>Chris
>>>>>
>>>>>
>>>>>
>>>>>From: Saber Razmjooei [mailto:razmjooeis at faunalia.co.uk]
>>>>>Sent: 27 July 2011 09:35
>>>>>To: Chris Green
>>>>>Cc: qgis-user at lists.osgeo.org
>>>>>Subject: Re: [Qgis-user] QGIS -> MySQL -> Mapserver ??
>>>>>
>>>>>
>>>>>
>>>>>Chris
>>>>>
>>>>>I presume your ogr can handle mysql if you can open it in QGIS. But
>>>>> to
>>>>>confirm could you run:
>>>>>
>>>>>ogrinfo --formats
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>from terminal and check if you have
>>>>>
>>>>>-> "MSSQLSpatial" (read/write)
>>>>>
>>>>>Is your database large? Have you considered using PostGIS?
>>>>>
>>>>>Cheers
>>>>>Saber
>>>>>
>>>>>
>>>>>On 27/07/11 07:45, Chris Green wrote:
>>>>>
>>>>>
>>>>>
>>>>>Hi QGIS users
>>>>>
>>>>>
>>>>>
>>>>>I have a problem getting Mapserver to display vector line features
>>>>> which I
>>>>>created with QGIS and saved as spatial objects in MySQL...I asked
>>>>> for some
>>>>>advice on this from the Mapserver forum yesterday but had no
>>>>> responses,
>>>>>perhaps someone in this forum has some experience to offer?
>>>>>
>>>>>
>>>>>
>>>>>As explained in the question below, I can create line features in
>>>>> QGIS, save
>>>>>them in a MySQL table, and recall and display them with QGIS
>>>>> without any
>>>>>problem.  But the same features do not appear to be recognised by
>>>>> OGRInfo or
>>>>>by Mapserver. The line features are saved as BLOB data in a MySQL
>>>>> MyISAM
>>>>>table in a column which is defined as type 'geometry'. MySQL can
>>>>> create a
>>>>>spatial index of these features.
>>>>>
>>>>>
>>>>>
>>>>>The table is accessed by QGIS as a database layer via the 'Add
>>>>> Vector Layer'
>>>>>dialogue. I am using QGIS 1.7.
>>>>>
>>>>>
>>>>>
>>>>>It's not really a QGIS problem, but I spent all day wrestling with
>>>>> this
>>>>>yesterday but have not solved it.  Any suggestions?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>Chris
>>>>>
>>>>>
>>>>>
>>>>>############################################################################
>>>>>###
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>I'm having some trouble with an OGR connection to a MySQL database.
>>>>> The data
>>>>>I'm trying to access was created using QGIS as a line layer and
>>>>> saved in a
>>>>>MySQL table as a BLOB in a geometry column. I can access and
>>>>> properly
>>>>>display this line data using QGIS, but not so far via Mapserver -
>>>>> nothing is
>>>>>drawn and I can't see any error.
>>>>>
>>>>>
>>>>>
>>>>>I am using Mapserver 6.0 and my mapfile is very similar to the
>>>>> example in
>>>>>theMapserver / MYSQL  documentation:
>>>>>
>>>>>
>>>>>
>>>>>LAYER
>>>>>
>>>>>       NAME "testLine"
>>>>>
>>>>>       TYPE   LINE
>>>>>
>>>>>       STATUS  DEFAULT
>>>>>
>>>>>       CONNECTIONTYPE  OGR
>>>>>
>>>>>       CONNECTION
>>>>> "mysql:testDB,user=admin,password=password,port=3306"
>>>>>
>>>>>       DATA "SELECT Geometry from testLine"
>>>>>
>>>>>       CLASS
>>>>>
>>>>>              STYLE
>>>>>
>>>>>                     COLOR  0 0 0
>>>>>
>>>>>                     WIDTH  2
>>>>>
>>>>>              END # style
>>>>>
>>>>>       END # class
>>>>>
>>>>>END # layer
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>If I look at the MySQL table using OGRinfo I see the following:
>>>>>
>>>>>
>>>>>
>>>>>Layer name: testLine
>>>>>
>>>>>Geometry: Unknown (any)
>>>>>
>>>>>Feature Count: 0
>>>>>
>>>>>Layer SRS WKT:
>>>>>
>>>>>(unknown)
>>>>>
>>>>>FID Coumn = id
>>>>>
>>>>>Geometry Column = Geometry
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>The issue seems to be that OGRInfo and therefore MapServer does not
>>>>>recognise any features in the table, but QGIS using access to the
>>>>> same table
>>>>>finds and displays the features.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>Anyone have any ideas what I am doing wrong?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>Chris
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>_______________________________________________
>>>>>Qgis-user mailing list
>>>>>Qgis-user at lists.osgeo.org
>>>>>http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>>
>>>>>
>>>>>
>>>>
>>>> ------------------------------
>>>>
>>>> Message: 4
>>>> Date: Wed, 27 Jul 2011 14:09:39 +0400
>>>> From: Maxim Dubinin <sim at gis-lab.info>
>>>> Subject: [Qgis-user] DTclassifier is released
>>>> To: qgis-developer at lists.osgeo.org
>>>> Cc: qgis-user at lists.osgeo.org
>>>> Message-ID: <77239752.20110727140939 at gis-lab.info>
>>>> Content-Type: text/plain; charset=us-ascii
>>>>
>>>> Hi all,
>>>>
>>>> To follow up on our demonstration in Lisbon.
>>>>
>>>> We  are happy to release our new plugin for streamlined remote
>>>> sensing
>>>> data    classification    in    QGIS    [0].  Initially the plugin
>>>> was
>>>> developed   to   provide   easy  to  use  tool to monitor forest
>>>> cover
>>>> change, but it can be used to classify any type of targets.
>>>>
>>>> Main features:
>>>> -  all-in-one, with this plugin only QGIS is needed for all steps
>>>> of
>>>> classification;
>>>> -  decision trees,  the  plugin  is  using  computer  vision
>>>> library OpenCV to
>>>> implement  modern  classification algorithm typically not available
>>>> in
>>>> other software packages (both OS and proprietory);
>>>> -   performance,   another   nice  feature  of  OpenCV  is  that it
>>>> is
>>>> very fast;
>>>> - multiple input rasters and multiple training layers;
>>>>
>>>> Description, examples and sample data:
>>>> EN: http://gis-lab.info/qa/dtclassifier-eng.html
>>>> RU: http://gis-lab.info/qa/dtclassifier.html
>>>>
>>>> Right now the windows binaries and source code are available.
>>>>
>>>> ---------
>>>> Maxim
>>>>
>>>> [0] http://www.nextgis.ru/projects/dtclassifier
>>>>
>>>>
>>>>
>>>> ------------------------------
>>>>
>>>> _______________________________________________
>>>> Qgis-user mailing list
>>>> Qgis-user at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>
>>>>
>>>> End of Qgis-user Digest, Vol 65, Issue 61
>>>> *****************************************
>>>> -------------- next part --------------
>>>> An HTML attachment was scrubbed...
>>>> URL:
>>>> http://lists.osgeo.org/pipermail/qgis-user/attachments/20110727/2d5a5976/attachment.html
>>>>
>>>> ------------------------------
>>>>
>>>> _______________________________________________
>>>> Qgis-user mailing list
>>>> Qgis-user at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>
>>>>
>>>> End of Qgis-user Digest, Vol 65, Issue 64
>>>> *****************************************
>>>>
>>> _______________________________________________
>>> Qgis-user mailing list
>>> Qgis-user at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
> --
>  --
>  Andreas Neumann
>  Böschacherstrasse 10A
>  8624 Grüt (Gossau ZH)
>  Switzerland
>
>
> ------------------------------
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
> End of Qgis-user Digest, Vol 65, Issue 68
> *****************************************
>



More information about the Qgis-user mailing list