[Qgis-user] ordering an attribute table

Nathan Woodrow madmanwoo at gmail.com
Fri Sep 27 07:44:26 PDT 2013


How big is your layer and could you upload it to somewhere for me, and
others, to test (note that I'm going to bed now so may not answer until
tomorrow)

- Nathan


On Sat, Sep 28, 2013 at 12:38 AM, Michael Spencer
<spencer.mike.r at gmail.com>wrote:

> Thanks Nathan,
>
> I see where you're coming from, but it's not working. The regex selects
> all values. I wonder if the problem lies in the data table? The column
> format is 'real' and I generated the column using the zonal statistics
> plugin from an underlying raster overlain with a regular grid. Null values
> seem to have been produced for cells outside the raster, with nan produced
> where the raster has no data.
>
> I recoded the raster output from grass to classify the no data values as
> -999. How do I go about selecting these? I thought "column" < 0 would work,
> but this doesn't select anything.
>
> Another option could be to use the raster tool and vectorise it,
> unfortunately this doesn't produce a whole grid as it only outputs integer
> values and joins some cells together.
>
>
> On 27 September 2013 13:44, Nathan Woodrow <madmanwoo at gmail.com> wrote:
>
>> Hey Michael,
>>
>> Try this expression using the advanced selection feature:
>>
>> regexp_match('column', '\\d*') = 1
>>
>> This is using a regex to match column as any number of digits (\\d*).  If
>> it's not a digit it will return 0 so you want to only select the ones that
>> = 1.
>>
>> - Nathan
>>
>>
>>
>> On Fri, Sep 27, 2013 at 10:16 PM, Michael Spencer <
>> spencer.mike.r at gmail.com> wrote:
>>
>>> Date: Thu, 26 Sep 2013 18:18:10 +0200
>>> From: Bernhard Str?bl <bernhard.stroebl at jena.de>
>>>
>>>
>>> Hi,
>>>
>>> Am 26.09.2013 18:07, schrieb Michael Spencer:
>>> > Having a strange problem at the moment.
>>> >
>>> > If I open a vector attribute table and click on a column heading to
>>> sort
>>> > the column then this doesn't seem to work. The column contains mainly
>>> > numbers with some NA and some NULL strings.
>>> >
>>> > The sort action groups most together most NA and NULL, and orders the
>>> > numbers, but some strings slip through the gaps and appear where they
>>> > aren't wanted in the number sequence!
>>> >
>>> > I'm working in QGIS 2.0.1 on Ubuntu 12.04.
>>> >
>>> > The reason I want to do this is to delete all records that aren't
>>> > numeric, so if there's a neater way to accomplish this that would be
>>> great!
>>>
>>> A neater way would be to select the records in question and then simply
>>> delete the selected. Hint select for nulls with
>>> <code>"my_field" is null</code>
>>>
>>> Thanks Bernhard, this was my original choice. Unfortunately I find the
>>> select tool a total black box and can't get my head around it. Your
>>> suggestion works for entries with 'null' in, but I can't get a response
>>> when I want to select 'nan' values. I've tried as:
>>>
>>> <"field" is nan>
>>> <"field" is 'nan'>
>>> <"field" = 'nan'>
>>>
>>> Both with no joy. Is there a crib sheet somewhere with basic options on?
>>>
>>> Ta,
>>> Michael
>>>
>>> Bernhard
>>>
>>> >
>>> > Ta,
>>> > Michael
>>>
>>> _______________________________________________
>>> 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/20130928/a0d5521e/attachment.html>


More information about the Qgis-user mailing list