[postgis-users] PostgreSQL HStore and PostGIS

2012-10-25 Thread Blair Deaver
Hello,

I have a need to design and develop an application which handles a wide
variety of possible variations for a database schema.  I am looking into a
number of options including popular NoSQL databases.  I do keep coming back
to PostgreSQL and PostGIS since I need to deal with geometries in a more
complex manner than either MongoDB or CouchDB Geospatial Indexing offer.

With that said, I have been looking into the new capabilities available
with PostgreSQL HStore
module
as
a possible alternative to be able to store geometries with PostGIS and tie
additional key/value pairs in a hstore data type column.


   - Can anyone comment on successful or unsuccessful attempts to implement
   such a technology approach integrating PostGIS with HStore?
   - How would one extract data out in such a manner (I suspect a custom
   program would need to be run)?


I do realize HStore is very new on the scene, but curious if this
environment is something that will even work with PostGIS.  Thanks!

Cheers,
Blair
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] PostgreSQL HStore and PostGIS

2012-10-25 Thread Stephen Frost
Blair,

* Blair Deaver (blairdea...@gmail.com) wrote:
> With that said, I have been looking into the new capabilities available
> with PostgreSQL HStore

Uhm..  hstore isn't exactly new.  It's been around since something like
8.0..  It is amusing how people are just now coming to see. :)

>- Can anyone comment on successful or unsuccessful attempts to implement
>such a technology approach integrating PostGIS with HStore?

I've not heard of anyone putting geometries into hstore's.  It'd be
possible, but realize that to put something into an hstore, it has to be
text.  Also, I don't think you'd be able to create a geometry index over
geometries which are inside of an hstore..  Or at least, if you did, it
might be difficult to actually use.

>- How would one extract data out in such a manner (I suspect a custom
>program would need to be run)?

Not sure what you mean by this, but you'd need to query the hstore using
the key that you want and then pull the geometry out as text and cast it
to an actual geometry column to use it.  If you just want the data out
in a text format, you'd run asewkt() on the geometry after you pull it
out of the hstore.

Thanks,

Stephen


signature.asc
Description: Digital signature
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] PostgreSQL HStore and PostGIS

2012-10-26 Thread Ricardo Bayley
Blair,

If I understood correctly you dont intend to store geometries in HStore but
in the standard geometry PostGIS enabled column.
Storing  key/value pairs in hstore should not bring any issues. You can
also index such hstore field for quick searches.
In order to properly get / set data in Hstore fields, read the
documentation. Since 9.1 (i think) hstore  set/get are diffrent from
previous versions.

I guess it all comes to how large will your table be, but my first
impression is you should be fine if your are just "storing" unstructured
data.


Hope this helped.


Ricardo



2012/10/25 Stephen Frost 

> Blair,
>
> * Blair Deaver (blairdea...@gmail.com) wrote:
> > With that said, I have been looking into the new capabilities available
> > with PostgreSQL HStore
>
> Uhm..  hstore isn't exactly new.  It's been around since something like
> 8.0..  It is amusing how people are just now coming to see. :)
>
> >- Can anyone comment on successful or unsuccessful attempts to
> implement
> >such a technology approach integrating PostGIS with HStore?
>
> I've not heard of anyone putting geometries into hstore's.  It'd be
> possible, but realize that to put something into an hstore, it has to be
> text.  Also, I don't think you'd be able to create a geometry index over
> geometries which are inside of an hstore..  Or at least, if you did, it
> might be difficult to actually use.
>
> >- How would one extract data out in such a manner (I suspect a custom
> >program would need to be run)?
>
> Not sure what you mean by this, but you'd need to query the hstore using
> the key that you want and then pull the geometry out as text and cast it
> to an actual geometry column to use it.  If you just want the data out
> in a text format, you'd run asewkt() on the geometry after you pull it
> out of the hstore.
>
> Thanks,
>
> Stephen
>
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] PostgreSQL HStore and PostGIS

2012-10-26 Thread Mike Toews
On 26 October 2012 12:26, Blair Deaver  wrote:
> Can anyone comment on successful or unsuccessful attempts to implement such
> a technology approach integrating PostGIS with HStore?

Here are some links of interest that pair up PostGIS + HStore:

http://www.stormdb.com/content/finding-dataset?destination=node%2F926
http://www.postgresonline.com/journal/archives/265-Schemas-vs.-Schemaless-structures-and-The-PostgreSQL-Type-Farm.html

-Mike
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users