<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18854"></META></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT color=#0000ff
size=2 face=Arial>Oscar,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT color=#0000ff
size=2 face=Arial>The template database Nicklas is refering to is called
template_postgis.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT color=#0000ff
size=2 face=Arial>That always gets installed with the windows installer.
You can't uncheck it so no need to go back to install to get it. The test
database postgis that gets created is just a sample database. I personally
uncheck that setting.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT color=#0000ff
size=2 face=Arial>To create a new postgis database, you use the template_postgis
as the template. (instead of the default template1 )</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT color=#0000ff
size=2 face=Arial>Its all outlined here</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT color=#0000ff
size=2 face=Arial><A
href="http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgis_tut01">http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgis_tut01</A>
(though note this one is for PostGIS 1.4)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT color=#0000ff
size=2 face=Arial>There is no such table called <FONT color=#000000 size=3
face="Times New Roman">SPATIAL_GEOMETRY_COLUMNS .</FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT color=#0000ff
size=2 face=Arial>The tables are</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT color=#0000ff
size=2 face=Arial><STRONG>geometry_columns</STRONG> and
<STRONG>spatial_ref_sys</STRONG></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT color=#0000ff
size=2 face=Arial>If you don't see those in your database or the below function
doesn't work, then you do not have postgis installed in your
database</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT
face="Courier New">SELECT postgis_full_version();</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT
face="Courier New"></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=250041923-13012010><FONT
face="Courier New">As Nicklas said better to go with PostGIS 1.4.1, but if you
are using postgis 1.3.6, then the file is called lwpostgis.sql (instead of
postgis.sql (for 1.4 and upcoming 1.5))</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=250041923-13012010></SPAN><FONT face="Courier New">H<SPAN
class=250041923-13012010>ope that clarifies things.</SPAN></FONT></DIV>
<DIV><FONT face="Courier New"><SPAN
class=250041923-13012010></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New"><SPAN
class=250041923-13012010>Thanks,</SPAN></FONT></DIV>
<DIV><FONT face="Courier New"><SPAN
class=250041923-13012010>Regina</SPAN></FONT></DIV>
<DIV><BR></DIV>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B>
postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of
</B>Nicklas Avén<BR><B>Sent:</B> Wednesday, January 13, 2010 9:08
AM<BR><B>To:</B> PostGIS Users Discussion<BR><B>Subject:</B> Re: [postgis-users]
Postgis installation<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV align=left>How do you mean it is working well?</DIV>
<DIV align=left>If you have all the spatial functionality working you most
likely have :</DIV>
<DIV align=left>geometry_columns </DIV>
<DIV align=left>and</DIV>
<DIV align=left>spatial_ref _sys table<BR>in your public schema.</DIV>
<DIV align=left> </DIV>
<DIV align=left>But as I understood you, you have installed PostGIS with
stackbuilder but without creating the template-database. Then all nessecary
dll-files and sql-scrips is installed, but the database is not spatially
enabled. And that can be done as I described in last mail. That have to be done
for each new database that you want to use spatial functionality in. The
difference if you had installed the template database is that then you could
have spatially enabled a new database by using db postgis as template.</DIV>
<DIV align=left> </DIV>
<DIV align=left>So</DIV>
<DIV align=left>Do you have a functional database with spatial functionality eg
st_distance, st_union and so on? or have you "only" installed postgis in the
server, yet.</DIV>
<DIV align=left> </DIV>
<DIV align=left>/Nicklas</DIV>
<DIV align=left> </DIV>
<DIV align=left><BR>2010-01-13 Oscar Zamudio wrote:<BR><BR>Thanks
Nicklas,></DIV>
<DIV>Maybe I did not expressed my questions very well. I already have a database
with PostGIS enabled and I am working well with it. I installed PostGIS 1.3.6 in
PostgreSQL as I mentioned using the App. Stack Builder. </DIV>>
<DIV>My problem is that now I want to check some PostGIS features as Reference
systems because I need to measure distances etc.. As I'm reading the manuals, I
learned about the existence of a SPATIAL_GEOMETRY_COLUMNS table (or example)
that I didn't find in my installation nor in my customer installation. I used to
see in another installation a database with the name "postgis" so I thought that
maybe in that database (that I guess is a master database for PostGIS extension)
I would find the tables that mention hte manuals. </DIV>>
<DIV>As I made a mistake in the original installation of PostGIS (didn't check
the creation of "postgis" database) I want to reinstall it and this time check
that option. How can I make this reinstallation and more important: can I do
this without affecting my own PostGIS enabled database I already created in
PosgreSQL? </DIV>>
<DIV>I certainly cannot update now to the last version of PostgreSQL and PostGIS
because my customer use this configuration and I don't want to push them now to
make these changes.</DIV>>
<DIV>Regards<BR>><BR>>>
<DIV>On Wed, Jan 13, 2010 at 10:33 AM, Nicklas Avén
<<A>nicklas.aven@jordogskog.no</A>> wrote:<BR>> >
<DIV>Hallo Oscar >
<DIV align=left> </DIV>>
<DIV align=left>You can spatially enable any database by loading and running
</DIV>>
<DIV align=left>lwpostgis.sql</DIV>>
<DIV align=left>and</DIV>>
<DIV align=left>spatial_ref_sys.sql</DIV>>
<DIV align=left> </DIV>>
<DIV align=left>for instance in pgAdmin</DIV>>
<DIV align=left> </DIV>>
<DIV align=left>I think that's the right name of the files for your version and
you can find them in :</DIV>>
<DIV align=left>C:\Program files\PostgreSQL\8.3\share\contrib</DIV>>
<DIV align=left>or something corresponing on your system.</DIV>>
<DIV align=left>Probably you will have to remove the lines with "vacuum" in the
spatial_ref_sys.sql before running. That issue shoud be fixed in upcoming
PostGIS 1.5</DIV>>
<DIV align=left> </DIV>>
<DIV align=left>But if you have the possibility you probably want to upgrade
both database and postgis. Latest stable now is</DIV>>
<DIV align=left>PostgreSQL 8.4.2 and PostGIS 1.4. Hopefully in a couple of weeks
PostGIS 1.5 will be released.</DIV>>
<DIV align=left> </DIV>>
<DIV align=left>Hope that helps</DIV>>
<DIV align=left>Nicklas>
<DIV><BR>><BR>> 2010-01-13 Oscar Zamudio wrote:<BR>><BR>> Hi
everybody. I'm a newbie and trying to use PostGIS with PostgreSQL in Windows. I
installed PostgreSQL 8.3 and also PostGIS 1.3.6 using the Application Stack
Builder. Spatial queries are working fine but I have some doubts about the
PostGIS configuration. Where can I find the <SPAN
style="LINE-HEIGHT: 18px; FONT-FAMILY: 'Lucida Grande', Verdana, Geneva, Arial, Helvetica, sans-serif">SPATIAL_REF_SYS
Table for example, or the GEOMETRY_COLUMNS table? </SPAN>At the time I was
installing the PostGIS extension I didn't check the creation of a postgis
database. I guess postgis database contains the tables that I'm looking for. Am
I wrong? ></DIV></DIV>>
<DIV>>
<DIV>I was thinking in reinstall the PostGIS 1.3.6 and create the postgis
database but I don't know how, as the Application Stack Builder doesn't allow me
to do that. Can anybody help me? Thanks in
advance</DIV></DIV></DIV><BR>>_______________________________________________<BR>>
postgis-users mailing
list<BR>><A>postgis-users@postgis.refractions.net</A><BR>><A
href="http://postgis.refractions.net/mailman/listinfo/postgis-users"
target=_blank>postgis.refractions.net/mailman/listinfo/postgis-users</A><BR>><BR>></DIV><BR>></DIV></BODY></HTML>