[GRASS5] Re: intersect sites with polygons?

Christoph Simon ciccio at kiosknet.com.br
Thu Jul 4 08:08:52 EDT 2002


On Thu, 4 Jul 2002 10:07:07 +0200
Radim Blazek <blazek at itc.it> wrote:

> Yes, if the list is created for old map, it may not change until
> the map is updated and topo is rebuilt. If the list is created 
> by v.mapcalc, it is OK. What I want to avoid is to enter order
> numbers by user:
> lista = select_by_box( mapa, (0,0,5,5) ) - is ok 
> listb = list( 1,5,8 ) -  could cause some problems, for example:
> user found somehow list 1,5,8, then rebuilt topology, and these
> numbers changed to 1,2,3. 
> OTOH, if user knows about this, it is powerful tool.

You said, that orderal numbers are not visible to the user, so the
user doesn't know them and there should be no danger of abuse.

> > > Why not use similar function for type/category?
> >
> > I also reached this point, but I will need to know more details. Is it
> > enough to use a character string for any complete SQL statement, or do
> > I need to split it up into FROM and WHERE clauses?
> 
> We need WHERE, because FROM is defined in DB file for each map/field.

This is what I understood, but I think it's a very limiting approach,
losing lots of SQL's power. My guess is, that this will change in the
future.

> Who are "SQL people"?

Don't know. Those who wrote the v.*.pg functions.

> > What if one map is associated with more than one table/column
> > in the database?
> 
> Defined by field + DB file. (I think, that there is realy timem, to
> test grass51.)

Yes. it is time :-) But do you suggest that you can specify more than
one field and more than one DB file (== table)? What about aggregate
functions?

> OK, may be it is, but if you allow optional TABLE/KEY, you must support
> these options in each module. In most cases, one map is associated with
> on table and user does not even want to know, how it is done.

If this is the most frequent case, it should stay as it is. But I
think sort of a backdoor needs to be opened.

> I think, that in v.mapcalc is possible to create list of categories
> by sql select statement and then use this list to select features:
> mapb = extract_by_cat ( mapa, sql_select ( "select id from x where f >
> 1") ); but in most cases:
> mapb = extract( mapa, "f > 1");

This might be the backdoor.

-- 
Christoph Simon
ciccio at kiosknet.com.br
---
^X^C
q
quit
:q
^C
end
x
exit
ZZ
^D
?
help
.



More information about the grass-dev mailing list