<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:black;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:black;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:Arial;
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        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=black vlink=black>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'>Hi<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'>When i connect a data source ( with ogr ) i am getting the a
layer first, then i am putting the layer in a loop and transforming
coordinates all the features one bye one,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'>(i am using python )<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'>import ogr<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'>import osr<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'>dss = ogr.Open('OCI:user/pass@db_name')<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'>sqls = 'select * from schema.table'<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'>layer = dss.ExecuteSQL( sqls )<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'>feature = graphics.GetNextFeature()<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'>while feature is not None:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'>
geom = feature.GetGeometryRef()<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'>
ref = osr.SpatialReference()<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'>
out_ref = osr.SpatialReference()<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'>
ref.ImportFromWkt( source_coor ) #source
coordinate definition wkt format<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'>
out_ref.ImportFromWkt( base_coor ) # the coordinate system whic i want to
transfom the features in wkt format<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'>
geom.AssignSpatialReference( ref )<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'>
geom.TransformTo(out_ref)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-indent:36.0pt'><font size=2 face=Arial><span
lang=TR style='font-size:10.0pt;font-family:Arial'>feature =
graphics.GetNextFeature()<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:36.0pt'><font size=2 face=Arial><span
lang=TR style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'>it’s working fine, but takes long time when i got a
huge data, i couldn’t find a way to transform all layer on one time without
a python loop… is there a way to do it?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=TR style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
</div>
</body>
</html>