From 067ad13b4b78a6477687ede0da89e288cff69ba0 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Fri, 15 Oct 2010 13:07:01 +0000 Subject: =?UTF-8?q?=E2=80=A2=20implemented=20filter=20content=20type=20'sp?= =?UTF-8?q?atial'=20with=20general=20spatial=20operators=20for=20usage=20a?= =?UTF-8?q?s=20filter=20of=20spatial=20fields?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Resources/English.lproj/ContentFilters.plist | 89 ++++++++++++++++++++++++++++ Source/SPTableContent.m | 4 ++ 2 files changed, 93 insertions(+) diff --git a/Resources/English.lproj/ContentFilters.plist b/Resources/English.lproj/ContentFilters.plist index d153a108..ce2710bd 100644 --- a/Resources/English.lproj/ContentFilters.plist +++ b/Resources/English.lproj/ContentFilters.plist @@ -283,5 +283,94 @@ Do quote strings manually. IS NOT NULL + spatial + + + MenuLabel + contains + NumberOfArguments + 1 + SuppressLeadingFieldPlaceholder + + Clause + MBRContains(GeomFromText('${}'),$CURRENT_FIELD) + + + MenuLabel + within + NumberOfArguments + 1 + SuppressLeadingFieldPlaceholder + + Clause + MBRWithin(GeomFromText('${}'),$CURRENT_FIELD) + + + MenuLabel + disjoint + NumberOfArguments + 1 + SuppressLeadingFieldPlaceholder + + Clause + MBRDisjoint(GeomFromText('${}'),$CURRENT_FIELD) + + + MenuLabel + equal + NumberOfArguments + 1 + SuppressLeadingFieldPlaceholder + + Clause + MBREqual(GeomFromText('${}'),$CURRENT_FIELD) + + + MenuLabel + intersects + NumberOfArguments + 1 + SuppressLeadingFieldPlaceholder + + Clause + MBRIntersects(GeomFromText('${}'),$CURRENT_FIELD) + + + MenuLabel + overlaps + NumberOfArguments + 1 + SuppressLeadingFieldPlaceholder + + Clause + MBROverlaps(GeomFromText('${}'),$CURRENT_FIELD) + + + MenuLabel + touches + NumberOfArguments + 1 + SuppressLeadingFieldPlaceholder + + Clause + MBRTouches(GeomFromText('${}'),$CURRENT_FIELD) + + + MenuLabel + IS NULL + NumberOfArguments + 0 + Clause + IS NULL + + + MenuLabel + IS NOT NULL + NumberOfArguments + 0 + Clause + IS NOT NULL + + diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index f6174366..5a130b96 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -135,6 +135,7 @@ [numberOfDefaultFilters setObject:[NSNumber numberWithInteger:[[contentFilters objectForKey:@"number"] count]] forKey:@"number"]; [numberOfDefaultFilters setObject:[NSNumber numberWithInteger:[[contentFilters objectForKey:@"date"] count]] forKey:@"date"]; [numberOfDefaultFilters setObject:[NSNumber numberWithInteger:[[contentFilters objectForKey:@"string"] count]] forKey:@"string"]; + [numberOfDefaultFilters setObject:[NSNumber numberWithInteger:[[contentFilters objectForKey:@"spatial"] count]] forKey:@"spatial"]; } kCellEditorErrorNoMatch = NSLocalizedString(@"Field is not editable. No matching record found.\nReload table, check the encoding, or try to add\na primary key field or more fields\nin the view declaration of '%@' to identify\nfield origin unambiguously.", @"Table Content result editing error - could not identify original row"); @@ -2242,6 +2243,9 @@ compareType = @"number"; // [argumentField setFormatter:numberFormatter]; + } else if ([fieldTypeGrouping isEqualToString:@"geometry"]) { + compareType = @"spatial"; + } else { compareType = @""; NSBeep(); -- cgit v1.2.3