<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered)">
<title>RE: [postgis-users] HELP adding spatial field to table</title>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"Book Antiqua";
panose-1:2 4 6 2 5 3 5 3 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0pt;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
p
{margin-right:0pt;
margin-left:0pt;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle18
{font-family:Arial;
color:navy;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=3 color=navy face="Book Antiqua"><span
style='font-size:12.0pt;font-family:"Book Antiqua";color:navy'>This question is
more to do with PostgreSQL then PostGIS but I’ve always gotten good
response on this forum and so I’m going back to the well. </span></font></p>
<p class=MsoNormal><font size=3 color=navy face="Book Antiqua"><span
style='font-size:12.0pt;font-family:"Book Antiqua";color:navy'> </span></font></p>
<p class=MsoNormal><font size=3 color=navy face="Book Antiqua"><span
style='font-size:12.0pt;font-family:"Book Antiqua";color:navy'>After a recent load,
I received the following error, “…No space left on device SQL State
53100 Hint: Check free Disk Space.” This error is fairly self-explanatory
but I don’t know how to approach the problem. In SQL server I would
simple stop autogrowth on a file group, create a new file group on a larger
partition and be done or alternately attached/detach the database onto new
partition and begin work again. My point is there are several ways but Im new
to PostrgeSQL and Im curious - what’s the best practice. I believe all
the data is in the installation directory <data> folder. Can I simply
move this folder and somehow reattach? Thanks in advance, Rich</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<div>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
</div>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=3 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Gregory
Williamson [mailto:Gregory.Williamson@digitalglobe.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Tuesday, December 11, 2007
7:48 PM<br>
<b><span style='font-weight:bold'>To:</span></b> Richard.Heimann@nrl.navy.mil;
PostGIS Users Discussion; Michael Smedberg; Richard.Heimann@nrl.navy.mil;
PostGIS Users Discussion<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [postgis-users] HELP
adding spatial field to table</span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>
<p style='margin-bottom:12.0pt'><font size=2 face="Times New Roman"><span
style='font-size:10.0pt'>I think it is rare that you'd want corrupt data. My
usual approach has been to load my data set into a temporary table (only lasts
for the session (or transaction)) and then apply sanity checks and either
delete offending rows or modify them if you know sane values to set them to.<br>
<br>
Then create the geometries from the data set and insert it into my real table,
possibly with something like<br>
INSERT INTO some_real_table SELECT gid,label_name,the_geom FROM foo
WHERE IsValid(the_geom);<br>
<br>
HTH,<br>
<br>
Greg W.<br>
(sorry for top-posting, challenged reader and pressed for time)<br>
<br>
-----Original Message-----<br>
From: postgis-users-bounces@postgis.refractions.net on behalf of Richard
Heimann [C]<br>
Sent: Tue 12/11/2007 4:57 PM<br>
To: 'Michael Smedberg'; Richard.Heimann@nrl.navy.mil; 'PostGIS Users
Discussion'<br>
Subject: RE: [postgis-users] HELP adding spatial field to table<br>
<br>
Thanks for the prompt response. And youre right there are some such values.<br>
Is there a work around?<br>
<br>
Rich<br>
<br>
<br>
-----Original Message-----<br>
From: Michael Smedberg [<a href="mailto:Michael.Smedberg@redfin.com">mailto:Michael.Smedberg@redfin.com</a>]<br>
Sent: Tuesday, December 11, 2007 6:55 PM<br>
To: Richard.Heimann@nrl.navy.mil; PostGIS Users Discussion<br>
Subject: RE: [postgis-users] HELP adding spatial field to table<br>
<br>
Are you sure that x and y always have legit values? If one were null or<br>
the zero-length string, I think you'd get an error like that.<br>
<br>
-----Original Message-----<br>
From: postgis-users-bounces@postgis.refractions.net<br>
[<a href="mailto:postgis-users-bounces@postgis.refractions.net">mailto:postgis-users-bounces@postgis.refractions.net</a>]
On Behalf Of<br>
Richard Heimann [C]<br>
Sent: Tuesday, December 11, 2007 3:44 PM<br>
To: 'PostGIS Users Discussion'<br>
Subject: [postgis-users] HELP adding spatial field to table<br>
<br>
All,<br>
<br>
Im getting some strange behavior that I cant explain and sadly know its<br>
likely trivial. My pursuit is simple, add a spatial filed to a table<br>
containing x,y.<br>
<br>
First. AddGeometryColumn<br>
<br>
SELECT AddGeometryColumn(
'crimetest', 'geom', 4326, 'POINT', 2)<br>
<br>
Next (and where the trouble lies)<br>
<br>
UPDATE crimetest<br>
SET geom = PointFromText('POINT(' ||
x || ' ' || y || ')', 4326)<br>
<br>
This is the error I receive.<br>
<br>
ERROR: Invalid OGC WKT (too short)<br>
SQL state: XX000<br>
Context: SQL function "geomfromtext" statement 1<br>
SQL function "pointfromtext" statement 1<br>
<br>
Can anyone shed some light on this?<br>
<br>
<br>
Thanks<br>
Rich<br>
<br>
<br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
postgis-users@postgis.refractions.net<br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
postgis-users@postgis.refractions.net<br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a></span></font></p>
</div>
</body>
</html>