Re: [postgis-users] tool to load dbf into postgresql table

2012-01-30 Thread Norman Vine

On Jan 29, 2012, at 11:39 PM, pcr...@pcreso.com wrote:

> > When did this become available?
> > I'm using pgsql2shp from Postgis version 1.5.3 for Linux, which is pretty 
> > current, 
> > and that is not a listed command line option.
> 
> Not really sure when but see 
> 
>   http://trac.osgeo.org/postgis/browser/trunk/loader/shp2pgsql-cli.c#L22
> 
> --- On Mon, 1/30/12, Richard Greenwood  wrote:
> 
> On Sun, Jan 29, 2012 at 7:17 PM, John Morgan  wrote:
> > Hello,
> > This may be more of a postgresql question, but it is related to my postgis
> > setup.  I was hoping that someone might know of an easy way to load a dbf
> > into postgresql table.  I have used the gdal tool shp2pgsql to load a
> > shapefile in this way and it worked great.  Is there a similar tool for
> 
> Use the -n switch with shp2pgsql will do what you want:
>shp2pgsql -n
> Also ogr2ogr will do the trick. ogr2ogr can also handle conversions
> between numerous other spatial and non-spatial data formats. ODBC is
> especially handy.
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] USGS NED Dataset

2010-08-20 Thread Norman Vine
FYI there is a copy of the USGS NED on a fat pipe @

http://collections.sdsc.edu/dac2/telascience/telascience_data/elevation/usgs_ned/


On Aug 20, 2010, at 1:58 PM, Mike Swope wrote:

> There used to be a service called geotorrent. It'd be nice if someone started 
> that back up.
> 
> How much data are you trying to download? You can still find some of the DEMs 
> as a file download without having to deal with the seamless site. 
> 
> On Fri, Aug 20, 2010 at 10:50 AM, Ron M  
> wrote:
> Stephen Frost wrote:
> > * Stephen Woodbridge (wood...@swoodbridge.com) wrote:
> >> Thanks! that is exactly what I needed to know. I'm in the painful
> >> process of downloading the NED data from there seamless download
> >> application - I can not tell you how frustrating these stupid apps are.
> >> Just give me a simple ftp site and wget would be so much easier for the
> >> users.
> >
> > Sure would be nice of someone to put up the data set on an FTP (or, even
> > better, easily wget'd HTTP) site once they've pulled it from the USGS
> > site... :)
> 
> Or at that size, perhaps bittorrent.
> 
> 
> 
> Or, another potential place -- an Amazon Web Service Public Data Set:
>   http://aws.amazon.com/publicdatasets/
> "Public Data Sets on AWS provides a centralized repository of
> public data sets that can be seamlessly integrated into AWS
> cloud-based applications. AWS is hosting the public data sets
> at no charge for the community"
> 
> I find their pre-loaded PostGIS open-street-map and 2008 TIGER/LINE
> data extremely convenient:
>   
> http://developer.amazonwebservices.com/connect/kbcategory.jspa?categoryID=275
> 
> 
> ___
> 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

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


Re: [postgis-users] Dot Density idea

2010-05-06 Thread Norman Vine
When I have done this before I usually triangulate the polygon
first  then use each triangles area to normalize the number of 
points randomly inserted into each triangle

On May 6, 2010, at 1:51 PM, David William Bitner wrote:

> If it was the overall density of the dots that mattered and not as much the 
> exact number of dots, a representative table could be made with a "random yet 
> even" set of dots covering a certain area. To apply to a polygon, you could 
> then Scale the data to the appropriate density and translate/compute the 
> intersection to apply to a given polygon.
> 
> On Thu, May 6, 2010 at 12:50 PM, Martin Davis  wrote:
> Did your algorithm work with irregular polgon extents?
> 
> 
> Jan Hartmann wrote:
> I did this long ago. Regular points won't work, you'll get all kinds of moire 
> patterns. I just computed random x and y values from the origin of the grid 
> cell within the x- and y grid-size. Can't remember having any problems with 
> overlapping points.
> 
> Jan
> 
> On 05/06/10 19:35, Paul Ramsey wrote:
> Even-yet-random :) nice requirement. How about just starting with a
> regular grid and then perturbing the elements randomly with a radius
> of a cell size? You can use the area of the polygon and number of
> needed points to calculate the appropriate cell size and go from
> there.
> 
> P
> 
> On Thu, May 6, 2010 at 10:28 AM, Martin Davis  wrote:
>  
> Good point about the need for even distribution of the points. That seems
> like a whole lot harder to code than simply randomly placing points in a
> polygon.  Does anyone have any pointers to algorithms for producing this
> effect?
> 
> George Silva wrote:
>
> The really big problem with dot density is that dots can overlap
> themselves,
> masking the real number, so if anything will be developed in this area,
> the
> points should be
> 
> A) evenly distributed
> or
> B) randomly distributed, but with some sort of "colision" tests, so there
> is
> no or little overlap.
> 
> This is a interesting idea, especially if we could make a materialized
> view
> with those points, which could be added to GIS software for presentation.
> 
> George
> 
> On Thu, May 6, 2010 at 1:53 PM, Sufficool, Stanley<
> ssuffic...@rov.sbcounty.gov>  wrote:
> 
> 
>  
> Looks nasty, but it might work:
> 
> select
> st_line_interpolate_point(
>   st_intersection(
>   the_geom,
>   st_makeline(
>   st_pointn(st_exteriorring(the_geom), (rand1.rand *
> st_npoints(st_exteriorring(the_geom)))::int),
>   st_pointn(st_exteriorring(the_geom), (rand2.rand *
> st_npoints(st_exteriorring(the_geom)))::int)
>   )
>   )
>   ,rand3.rand
> )
> from insert_your_table_name_here,
> (select random() as rand, generate_series(1,1000) as point_number) as
> rand1
> JOIN (select random() as rand, generate_series(1,1000) as point_number)
> as
> rand2
>   ON rand1.point_number = rand2.point_number
> JOIN (select random() as rand, generate_series(1,1000) as point_number)
> as
> rand3
>   ON rand2.point_number = rand3.point_number
> WHERE st_geometrytype(
>   st_intersection(
>   the_geom,
>   st_makeline(
>   st_pointn(st_exteriorring(the_geom), (rand1.rand *
> st_npoints(st_exteriorring(the_geom)))::int),
>   st_pointn(st_exteriorring(the_geom), (rand2.rand *
> st_npoints(st_exteriorring(the_geom)))::int)
>   )
>   )
> ) = 'ST_LineString'
> AND oid = 5030 /* Enter your own OID here */
> limit 100
> 
> 
> 
> 
>
> -Original Message-
> From: postgis-users-boun...@postgis.refractions.net
> [mailto:postgis-users-boun...@postgis.refractions.net] On
> Behalf Of Martin Davis
> Sent: Thursday, May 06, 2010 8:56 AM
> To: John Abraham; postgis-users@postgis.refractions.net; Martin Davis
> Subject: Re: [postgis-users] Dot Density idea
> 
> 
> I was thinking the same thing!
> 
> strk wrote:
> 
>  
> ST_RandomPoinsOnSurface(geometry, numpoints) would be an interesting
> function indeed. Sounds like a good job for GEOS/JTS.
> 
> --strk;
> 
> On Mon, May 03, 2010 at 10:49:32PM -0600, John Abraham wrote:
> 
> 
>
> One of the things I miss about using ESRI's GIS is the
> 
>   
> ability to do
> 
>  
> dot-density maps.  Within a polygon, the number of dots is
> 
>   
> proportional to a value, and the dots are randomly placed.  I
> find it useful to be able to present several data values at
> once (e.g. blue dots for population, red dots for employment).
> 
>  
> I also find that it is a more intuitive way of scaling for
> 
>   
> zone size
> 
>  
> than dividing the value by the area of the zone.  That is,
> 
>   
> the count
> 
>  
> of the dots represents the actual number, but the density
> 
>   
> of the dots
> 
>  
> represents the density of the number.  So I don't have to deci

[postgis-users] RE: [OSGeo-Discuss] Brief history of GIS OSS (bit off topic?)

2008-08-20 Thread Norman Vine
Mateusz Loskot writes
> Sent: Wednesday, August 20, 2008 10:29 PM

> Subject: Re: [OSGeo-Discuss] Brief history of GIS OSS (bit off topic?)
> 
> George Silva wrote:
> > Hello lists,
> > 
> > As you can i see im mailing this message to some lists around the web 
> > (im sorry if thats a problem).
> > 
> > At the moment i am writing my BSc thesis (Geography) focusing the 
> > development of a open source software and database for logging and 
> > analysing traffic accidents in Uberlândia, MG - Brazil.
> > 
> > I am dedicating a chapter in my thesis to explaining Open Source 
> > Software, and OSS for GIS. i searched the web for some 
> history of OSS in 
> > general, but i found too many different sources. So i come to you, 
> > developers of GIS OSS, to see if you can give me references 
> of where to 
> > search for the history and process regarding this theme.
> 
> George,
> 
> Here is number of "keywords" related to history of FOSS4G
> and that you may google for and find details:
> 
> - Sol Katz
> - Map Overlay and Statistical System (MOSS)
> - GRASS History (http://grass.itc.it/devel/grasshist.html)
> - UMP MapServer history


Mateusz

Great credits but don't forgot http://trac.osgeo.org/proj/ or perhaps 

http://members.verizon.net/~vze2hc4d/proj4/ :-)

Thanks Gerry !!


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


RE: [postgis-users] Compare SQL Server 2008 Spatial, PostGIS, MySQL functionality

2008-07-17 Thread Norman Vine
Paul Ramsey writes
> 
> I'm not that any of the databases use the hipparchus mesh.
> IBM Informix Geodetic might, but I think someone told me they
> *didn't*, as it wasn't "all that".
> IBM Informix Spatial has an R-Tree
> IBM DB2 Spatial I think uses a quadtree
> IBM DB2 Geodetic I think *does* use the hipparchus mesh

Yes 

DB2 Geodetic uses Spherical Voronoi Tessalation
 eg Hipparcus 'mesh'

Cheers

Norman

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


RE: [postgis-users] Great circle as a linestring

2008-03-03 Thread Norman Vine

One usually computes the midpoint along the great circle
then compares the distance it is from the straight line
between the endpoints and recursively does this for the 
resulting segments until the error term is 'good enough.

The algorithm goes something like

DrawGreatCircle(error,pt1,pt2,style):

 proj_pt1 = WorldToDevice(ProjFwd(pt1))
 proj_pt2 = WorldToDevice(ProjFwd(pt2))
 mid_pt   = MidPointGreatCircle(pt1,pt2)
 proj_mid = WorldToDevice(ProjFwd(mid_pt))

 if distPointLine2D (proj_mid, Line2D(proj_pt1,proj_pt2)) < error:
DrawLine(proj_pt1,proj_pt2,style)
 else:
DrawGreatCircle(error,pt1,mid_pt)
DrawGreatCircle(error,mid_pt,pt2)

http://williams.best.vwh.net/avform.htm#Intermediate
 
HTH
 
Norman

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


RE: [postgis-users] How to select the highest y-value within all storedobjects

2008-03-03 Thread Norman Vine
Simon Schneider
> 
> I have a table storing polygon objects and I'm looking for a 
> way to get 
> the highest y-coordinate within all these objects.
> 
> I know which polygon contains this value but I'm wondering 
> whether there 
> is a way to build a query which delivers only coordinates and not the 
> polygon itself.

The envelope of the polygon would sort of give you that

http://postgis.refractions.net/docs/ch06.html#id2912634
ST_Envelope(geometry)

Norman

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


RE: [postgis-users] Great circle as a linestring

2008-03-03 Thread Norman Vine
Dane Springmeyer writes
> 
> Okay, I've got a bit closer. The right way to do this is 
> likely a function that computes the route between two points 
> borrowing from some of the formulas here:
> http://williams.best.vwh.net/avform.htm#Crs The postgis 
> function that calculates the great circle distance is likely 
> engineered this way, but we'll have to hear from the experts on that.


Close   :-)

One usually computes the midpoint along the great circle
then compares the distance it is from the straight line
between the endpoints and recursively does for this for 
the resulting segments until the error term is 'good enough

http://williams.best.vwh.net/avform.htm#Intermediate

HTH

Norman

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


RE: [postgis-users] Projection for Calculating Area

2008-02-21 Thread Norman Vine
Travis Kirstine writes:
> 
> We have been developing a web mapping application using google maps as
> the front end interface with a postgis backend.  Using this
> application the user can draw a bounding box in google maps and the
> coordinates are then passed to postgis.  With postgis we then perform
> a query on the polygons stored in the postgis database to return the
> area using  ST_Intersection, ST_Transform (usually to UTM) and finally
> ST_Area.  The application works great but the problem is  that since
> we are trying to work on a global scale it is difficult to determine
> what projection (EPSG) to transform the data to calculate an accurate
> area since our data is in EPSG:4326 and returns decimal degrees.  We
> can easily transform the query results to a UTM or a Albers projection
> however the results can be inaccurate since the user may select
> multiple zones or hemispheres when view the map at a global scale.  Is
> there a accurate global projection for calculating area?

This paper discusses the problem and describes its solution in a non 
FOSS system
http://geodyssey.com/papers/ggelare.html

I see this but haven't read it
http://portal.acm.org/citation.cfm?id=302304.302315

HTH

Norman

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


RE: [postgis-users] Why no support for polyhedral surfaces?

2008-02-10 Thread Norman Vine
Simon Schneider writes:
> 
> I'm wondering why there is no support for polyhedral surfaces 
> in postgis 
> as for me it seems that this datatpye belongs to the simple features 
> specification.

Simple features is probably at best 2.5D   eg 
How does one describe a cave in the 'simple features spec' ?

For 2.5D multipolygon suffices well enough no ?

Cheers

Norman

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