[GRASS-user] Selecting entries in a vector map

Markus Neteler neteler at osgeo.org
Mon Nov 11 14:12:41 PST 2013


On Fri, Oct 25, 2013 at 8:37 PM, Christopher Schroeder
<christopher at boozecarriage.com> wrote:
> I am new to grass, but not GIS (I was trained in ArcGIS in collage a year or
> so ago.)  I feel like what I am trying to do is simple, yet I am not having
> any luck.

So let's hope to improve that :-)

> I have two vector maps, one of zipcodes in New York State, and one of New
> York counties.  The goal is to have a map of New York City by zipcode.  I
> was going to select the New York City counties that are NYC (the fine folks
> at the NYS gis repository already have this as a category in the County
> file.)   Unfortunately, I cannot get past the first step.  Trying to use the
> SQL query from the "GIS Attribute Table Manager" causes GRASS to crash (I'm
> using windows GRASS.)

Well, "this should not happen". Which version do you use exactly?
And this query?

> Using the selection option from d.vect causes it to
> display nothing.  I'm not certain about the proper syntax for the SQL query,
> but I have tried all the obvious options. the field is called NYS and is
> Y/N.  So as far as I can tell, the SQL query should be something like NYS =
> Y or NYS = "Y"

It depends on your DB backend. Unfortunately SQL is not SQL at 100%.
Please see also
http://grass.osgeo.org/grass64/manuals/sql.html

> Do I need to install SQL under windows to have the SQL queries work?

No, nothing to install.

> It doesn't look like it as far as I can tell from the documentation.  am I
> missing something with the SQL query? Is this a known bug?

We need to know you query for this and which DB backend you use.

Best
Markus (travelling now)


More information about the grass-user mailing list