<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16481" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=651473411-16102008>Smith,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=651473411-16102008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=651473411-16102008>Take a look at the Linear Referencing functions.
To get the center point that is guaranteed to fall on the line, I would use
<SPAN class=term><FONT face="Times New Roman" color=#000000
size=3>ST_line_interpolate_point(linestring,
0.5)</FONT></SPAN></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=651473411-16102008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=651473411-16102008><A
href="http://postgis.refractions.net/documentation/manual-svn/ch06.html#id2616367">http://postgis.refractions.net/documentation/manual-svn/ch06.html#id2616367</A></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=651473411-16102008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=651473411-16102008>Be forewarned the above link will be changing soon
since the SVN manual is a moving target and will be added more examples
shortly.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=651473411-16102008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=651473411-16102008>Hope that helps,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=651473411-16102008>Regina</SPAN></FONT></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B>
postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of </B>Smith
Roman<BR><B>Sent:</B> Thursday, October 16, 2008 7:28 AM<BR><B>To:</B> Users
Postgis<BR><B>Subject:</B> [postgis-users] computing the center of a Linestring
?<BR></FONT><BR></DIV>
<DIV></DIV>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top><FONT size=2>
<DIV>HI,</DIV>
<DIV>I have a base map of lagos, Nigeria that contains roads, streets and
points of interest (POI). Unfortunately the street addresses are not
geocoded. I was told they are possible ways to geocode such kind of data
e.g. geocode to a street name, geocode to a street intersection and/or
point of interest.</DIV>
<DIV> </DIV>
<DIV>I will like to ask what postgis functions can be used to do this kind
of operation ? </DIV>
<DIV> </DIV>
<DIV>For example, If I intend geocoding to a street name, this will imply
assigning point coordinates to represent each street, to this i will need
to get the center point of each street. By their nature streets and roads
are not straight.</DIV>
<DIV> is there a postgis function for computing the center of a
Linestring ? especially if the linestring is not straight but has a few
curves. All the roads and streets are represented as linestrings in my
data.</DIV>
<DIV> </DIV>
<DIV>It will be appreciated if I can get suggestions on the geocoding
method to use and how postgis can be used to implement it. </DIV>
<DIV> </DIV>
<DIV>Thanks, </DIV>
<DIV> </DIV>
<DIV>Smith.</DIV>
<DIV></DIV></FONT></TD></TR></TBODY></TABLE><BR></BODY></HTML>
<HTML><BODY><P><hr size=1></P>
<P><STRONG>
The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer.
</STRONG></P></BODY></HTML>
<P><hr size=1></P>
<P><STRONG><font size="2" color="339900"> Help make the earth a greener place. If at all possible resist printing this email and join us in saving paper. </p> <p> </font></STRONG></P>