diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-10-15 13:07:01 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-10-15 13:07:01 +0000 |
commit | 067ad13b4b78a6477687ede0da89e288cff69ba0 (patch) | |
tree | 70f7f218d7b4a492105908b12c3db59cdc67c5df | |
parent | 64ac1e5d62427841df47f862a1017e49e2b34aa5 (diff) | |
download | sequelpro-067ad13b4b78a6477687ede0da89e288cff69ba0.tar.gz sequelpro-067ad13b4b78a6477687ede0da89e288cff69ba0.tar.bz2 sequelpro-067ad13b4b78a6477687ede0da89e288cff69ba0.zip |
• implemented filter content type 'spatial' with general spatial operators for usage as filter of spatial fields
-rw-r--r-- | Resources/English.lproj/ContentFilters.plist | 89 | ||||
-rw-r--r-- | Source/SPTableContent.m | 4 |
2 files changed, 93 insertions, 0 deletions
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.</string> <string>IS NOT NULL</string> </dict> </array> + <key>spatial</key> + <array> + <dict> + <key>MenuLabel</key> + <string>contains</string> + <key>NumberOfArguments</key> + <integer>1</integer> + <key>SuppressLeadingFieldPlaceholder</key> + <true/> + <key>Clause</key> + <string>MBRContains(GeomFromText('${}'),$CURRENT_FIELD)</string> + </dict> + <dict> + <key>MenuLabel</key> + <string>within</string> + <key>NumberOfArguments</key> + <integer>1</integer> + <key>SuppressLeadingFieldPlaceholder</key> + <true/> + <key>Clause</key> + <string>MBRWithin(GeomFromText('${}'),$CURRENT_FIELD)</string> + </dict> + <dict> + <key>MenuLabel</key> + <string>disjoint</string> + <key>NumberOfArguments</key> + <integer>1</integer> + <key>SuppressLeadingFieldPlaceholder</key> + <true/> + <key>Clause</key> + <string>MBRDisjoint(GeomFromText('${}'),$CURRENT_FIELD)</string> + </dict> + <dict> + <key>MenuLabel</key> + <string>equal</string> + <key>NumberOfArguments</key> + <integer>1</integer> + <key>SuppressLeadingFieldPlaceholder</key> + <true/> + <key>Clause</key> + <string>MBREqual(GeomFromText('${}'),$CURRENT_FIELD)</string> + </dict> + <dict> + <key>MenuLabel</key> + <string>intersects</string> + <key>NumberOfArguments</key> + <integer>1</integer> + <key>SuppressLeadingFieldPlaceholder</key> + <true/> + <key>Clause</key> + <string>MBRIntersects(GeomFromText('${}'),$CURRENT_FIELD)</string> + </dict> + <dict> + <key>MenuLabel</key> + <string>overlaps</string> + <key>NumberOfArguments</key> + <integer>1</integer> + <key>SuppressLeadingFieldPlaceholder</key> + <true/> + <key>Clause</key> + <string>MBROverlaps(GeomFromText('${}'),$CURRENT_FIELD)</string> + </dict> + <dict> + <key>MenuLabel</key> + <string>touches</string> + <key>NumberOfArguments</key> + <integer>1</integer> + <key>SuppressLeadingFieldPlaceholder</key> + <true/> + <key>Clause</key> + <string>MBRTouches(GeomFromText('${}'),$CURRENT_FIELD)</string> + </dict> + <dict> + <key>MenuLabel</key> + <string>IS NULL</string> + <key>NumberOfArguments</key> + <integer>0</integer> + <key>Clause</key> + <string>IS NULL</string> + </dict> + <dict> + <key>MenuLabel</key> + <string>IS NOT NULL</string> + <key>NumberOfArguments</key> + <integer>0</integer> + <key>Clause</key> + <string>IS NOT NULL</string> + </dict> + </array> </dict> </plist> 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(); |