Tag Info

Hot answers tagged

11

The number values in your example query have quotation marks around them, so it looks like the problem is that your house numbers are stored as strings and not as numbers. You can check by right-clicking the field heading and clicking Properties. If the type is String, you'll need to create a new House Number field of the Integer type. Use the Field ...


4

To use [FULL|INNER|LEFT|RIGHT|OUTER|CROSS] JOIN syntax supported by PostgreSQL, the query would still need ST_Within(). I've never seen any spatial database use IS WITHIN, since there could be parameters for the spatial relation, such as ST_DWithin. It should look like this: SELECT p.*, b.polyname FROM points p INNER JOIN shapes s ON ST_Within(p.the_geom, ...


3

Here is a piece of code based on @artwork21's proposed workflow. It uses arcpy.da cursors so you need to have at least a 10.1 license. I've assumed the fields have the following format: height: numeric area_id: numeric or text (see comments in code) highest: numeric (short) import arcpy points = r"D:\test.gdb\points" ## make a list of unique area_id ...


3

I would recommend to use python for this, the general code flow would go something like this: Use arcpy.da.search cursor to iterate through AREAid column Nest another arcpy.da.search cursor (with sql expression of AREAid value to filter by) to get HEIGHT values and use a max() method on the cursor to get max value (e.g. highValue = max(cursor)) Within ...


3

Well, I think the problem you are having is, with your expression as is, this condition you wrote is being evaluated for each row/record in your data. So, if you had a table like: OID | Value 1 | 123 2 | 456 3 | 789 my understanding is that your expression, with real values substituted in for variables, would look like: 123 >= MAX(123)*0.25 456 ...


3

Use the Select tool Extracts features from an input feature class or input feature layer, typically using a select or Structured Query Language (SQL) expression and stores them in an output feature class.


2

I'm assuming the ID field is what uniquely identifies the person. BTW, really bad to use * especially since Table1 and TAble2 have at least ID in common. SELECT Table1.* FROM Table1 INNER JOIN Table2 ON Table1.ID = Table2.ID WHERE Table1.Date = '2008-11-04' AND NOT EXISTS ( SELECT Y.ID FROM Table1 As Y WHERE Y.ID = Table1.ID ...


2

Here is information about the console they are probably talking about. Google Chrome Console. And for Firefox. And for Safari. And for IE. They all provide similar abilities to give you information about your Javascript issues.


2

You are looking for Exterior ring SELECT gid, ST_ExteriorRing(the_geom) AS ering FROM sometable;


2

I have a table in PostGIS structured like this: CREATE TABLE locations ( id integer NOT NULL, mp_id character varying(50), dt timestamp with time zone DEFAULT now(), the_geom geometry, CONSTRAINT pk_emp PRIMARY KEY (id) ) For this table, I make the following Parametric View SELECT id, mp_id, dt, the_geom FROM locations where ...


1

I don't know what the magic in table2 is all about. However, your x looks like '2008-11-04' and y looks like '2012-11-06'. If your dates have a time component in them, then you may be failing to match on date i.e. 2011-11-06 may have a time value of 00:00:00 or midnight while the dates in your table have 2011-11-06 16:35:33. Those two dates are not equal. ...


1

The technique I use to do this in ModelBuilder is to: Run Summary Statistics (Analysis) to write the MAX value into its output table Use Get Field Value (ModelBuilder) to read the first row of the table just created which holds that MAX value



Only top voted, non community-wiki answers of a minimum length are eligible