[gdal-dev] Python API docs

2022-10-20 Thread Chaitanya kumar CH
Hi all,

Does anyone know where the python api docs are moved? I can't find them at "
gdal.org/python".
Thank you

Best regards,
Chaitanya Kumar CH.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] How to get value of Spatial Attributes Ogr Provider

2014-11-09 Thread Chaitanya kumar CH
Đào,

You can look for the M_SREL feature in the required area and read it's
attributes.

You can apply a spatial filter on the M_SREL layer with the particular
DEPCNT feature.

Also, note that the DEPCNT features are often not very accurate.


On Mon, Nov 10, 2014 at 10:03 AM, Dao Thang  wrote:

> Hi Chaitanya,
>
> QUAPOS is not attribute of feature object of Depth contour. I know that.
>
> But QUAPOS that i searching is spatial attribute of Spatial object. You
> can read S57 specification to know Spatial Attribute.
>
> Thanks
>
>
> —
>
> *Đào Trọng Thắng*
> *Mobile:* 0919 262 988
> Tầng 11 - Handi Resco Building
>  521 Kim Mã - Hà Nội
> *Email: thang...@gmail.com *
> *YM**:** daothang2004*
> —
>
> Google Talk: thanghps Skype: thanghps
> Contact Me [image: Facebook] <http://facebook.com/thanghps>[image:
> Twitter] <http://twitter.com/thanghps>
>
>
>
> <http://my.wisestamp.com/link?u=mjd9tz39tqz5jn9m&site=www.wisestamp.com/email-install>
>
>
> On Mon, Nov 10, 2014 at 11:22 AM, Chaitanya kumar CH <
> chaitanya...@gmail.com> wrote:
>
>> Đào,
>>
>> Refer to http://www.s-57.com/
>> Depth contour features don't have a Quality of position attribute.
>>
>> On Mon, Nov 10, 2014 at 7:29 AM, Dao Thang  wrote:
>>
>>> Hi All,
>>>
>>> I used sharpmap with ogr provider to read S57 file.
>>>
>>> But i don't see the spatial attributes example: QUAPOS attribute in the
>>> DEPCNT layer.
>>>
>>> Does anyone help me get it.
>>>
>>> Thanks
>>>
>>> [image: Inline image 1]
>>>
>>> —
>>>
>>> *Đào Trọng Thắng*
>>> *Mobile:* 0919 262 988
>>> Tầng 11 - Handi Resco Building
>>>  521 Kim Mã - Hà Nội
>>> *Email: thang...@gmail.com *
>>> *YM**:** daothang2004*
>>> —
>>>
>>> Google Talk: thanghps Skype: thanghps
>>> Contact Me [image: Facebook] <http://facebook.com/thanghps>[image:
>>> Twitter] <http://twitter.com/thanghps>
>>>
>>>
>>>
>>> <http://my.wisestamp.com/link?u=mjd9tz39tqz5jn9m&site=www.wisestamp.com/email-install>
>>>
>>>
>>> ___
>>> gdal-dev mailing list
>>> gdal-dev@lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>
>>
>>
>>
>> --
>> Best regards,
>> Chaitanya kumar CH.
>>
>> +91-9494447584
>> 17.2416N 80.1426E
>>
>
>


-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] How to get value of Spatial Attributes Ogr Provider

2014-11-09 Thread Chaitanya kumar CH
Đào,

Refer to http://www.s-57.com/
Depth contour features don't have a Quality of position attribute.

On Mon, Nov 10, 2014 at 7:29 AM, Dao Thang  wrote:

> Hi All,
>
> I used sharpmap with ogr provider to read S57 file.
>
> But i don't see the spatial attributes example: QUAPOS attribute in the
> DEPCNT layer.
>
> Does anyone help me get it.
>
> Thanks
>
> [image: Inline image 1]
>
> —
>
> *Đào Trọng Thắng*
> *Mobile:* 0919 262 988
> Tầng 11 - Handi Resco Building
>  521 Kim Mã - Hà Nội
> *Email: thang...@gmail.com *
> *YM**:** daothang2004*
> —
>
> Google Talk: thanghps Skype: thanghps
> Contact Me [image: Facebook] <http://facebook.com/thanghps>[image:
> Twitter] <http://twitter.com/thanghps>
>
>
>
> <http://my.wisestamp.com/link?u=mjd9tz39tqz5jn9m&site=www.wisestamp.com/email-install>
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Questions about polygonization

2014-08-19 Thread Chaitanya kumar CH
Try qgis to display the raster and the vector output. It shows the raster
pixels as rectangular areas. To confirm that there is no shift, compare
their extents using gdalinfo and ogrinfo.
 On 20 Aug 2014 07:56, "John Twilley"  wrote:

> The program is not shifting the pixels, but the program does assume
> the pixels to be points and not rectangular areas so maybe I will have
> to shift the pixels.  Do you know what transformation I would need to
> use?
>
> Jack.
> --
> mathuin at gmail dot com
>
>
> On Tue, Aug 19, 2014 at 7:17 PM, Chaitanya kumar CH
>  wrote:
> > Jack,
> > The GDALPolygonize algorithm draws the polygon edges along the pixel
> edges.
> > It assumes the pixels to be rectangular areas instead of points.
> > In the example you described, the first polygon should contain four
> vertices
> > with the pixel in the centre.
> > Make sure that the program you are using to display them is not shifting
> the
> > pixels.
> >
> > On 20 Aug 2014 07:12, "John Twilley"  wrote:
> >>
> >> I am trying to use GDAL's polygonize algorithms to help me identify
> >> regions in landcover data.  I made a trivial example, but I am having
> >> trouble understanding the results that I get, nor can I determine how
> >> to get the results I want.
> >>
> >> Given the following raster:
> >>
> >> 11 11 11 11 11
> >> 11 11 11 11 11
> >> 11 11 12 11 11
> >> 11 11 11 11 11
> >> 11 11 11 11 11
> >> 11 11 11 11 11
> >>
> >> If I were to polygonize this raster, I would expect two polygons:  one
> >> which contains the single point 12, and another with an outer ring was
> >> the perimeter of the raster and an inner ring circling the single
> >> point 12.  I would also expect that the first polygon would contain
> >> the single point 12 and that the second polygon would contain all the
> >> points 11.
> >>
> >> Instead, what I got was a polygon starting from the single point 12
> >> and extending down and to the right one pixel, and another polygon
> >> with an outer ring that went off the down and right edges and an inner
> >> ring equal to the first polygon's outer ring.  The first polygon
> >> doesn't actually contain any points and the second one doesn't contain
> >> any points on either ring but does contain all the other points.
> >>
> >> What do I need to do to get the results I am expecting?
> >>
> >> Jack.
> >> --
> >> mathuin at gmail dot com
> >> ___
> >> gdal-dev mailing list
> >> gdal-dev@lists.osgeo.org
> >> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Questions about polygonization

2014-08-19 Thread Chaitanya kumar CH
Jack,
The GDALPolygonize algorithm draws the polygon edges along the pixel edges.
It assumes the pixels to be rectangular areas instead of points.
In the example you described, the first polygon should contain four
vertices with the pixel in the centre.
Make sure that the program you are using to display them is not shifting
the pixels.
 On 20 Aug 2014 07:12, "John Twilley"  wrote:

> I am trying to use GDAL's polygonize algorithms to help me identify
> regions in landcover data.  I made a trivial example, but I am having
> trouble understanding the results that I get, nor can I determine how
> to get the results I want.
>
> Given the following raster:
>
> 11 11 11 11 11
> 11 11 11 11 11
> 11 11 12 11 11
> 11 11 11 11 11
> 11 11 11 11 11
> 11 11 11 11 11
>
> If I were to polygonize this raster, I would expect two polygons:  one
> which contains the single point 12, and another with an outer ring was
> the perimeter of the raster and an inner ring circling the single
> point 12.  I would also expect that the first polygon would contain
> the single point 12 and that the second polygon would contain all the
> points 11.
>
> Instead, what I got was a polygon starting from the single point 12
> and extending down and to the right one pixel, and another polygon
> with an outer ring that went off the down and right edges and an inner
> ring equal to the first polygon's outer ring.  The first polygon
> doesn't actually contain any points and the second one doesn't contain
> any points on either ring but does contain all the other points.
>
> What do I need to do to get the results I am expecting?
>
> Jack.
> --
> mathuin at gmail dot com
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] querry in updating attribute values using ogrdatasource

2014-08-14 Thread Chaitanya kumar CH
Siva,

OGR SQL dialect doesn't support updates. Use sqlite dialect. You also need
to update GDAL to version 1.10.

http://www.gdal.org/ogr_sql_sqlite.html
 On 14 Aug 2014 20:17, "SIVA RAMA KRISHNA"  wrote:

> Hello,
>
> I am trying to update shape file with attribute values .I am performing
> following
>
> functionality.
>
> QFileInfo table1(_mActiveLayer); //_mActive Layer is name of file opened
> QString tablename1;
> tablename1=table1.baseName();
> reader = OGRSFDriverRegistrar::Open(_mActiveLayer.toLatin1().data(), TRUE
> );
> if(reader==NULL)
> {
> exit(0);
> }
>
>
> poLayer = reader->GetLayer(0);
> querrysatatement="UPDATE " +tablename1+" set  SAL= 500 where EMPCODE = 1"
> ;//table Name is name of the table releated to _mActiveLayer
> QByteArray bnewconn = querrysatatement.toLatin1();
> conninfonew = new char[bnewconn.length()+1];
> strcpy(conninfonew,querrysatatement.toLatin1().data());
> poLayer=reader->ExecuteSQL (conninfonew,NULL,dialect.toLatin1().data());
>
> OutPut
> syntax error in sql statement
>
> Environment:
>
> Unbuntu 12.04
>
> Gdal version -- 1.9.2
> geos version --  3.3.3
>
> Thanks in advance to all
>
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Usage of styles in C API

2014-08-03 Thread Chaitanya kumar CH
With Nik available for testing, I can update the style table definition.
On 3 Aug 2014 16:39, "Even Rouault"  wrote:

> Le dimanche 03 août 2014 12:55:44, Nik Sands a écrit :
> > Thanks Even,
> >
> > Yes, deleting the spaces seems to get it working correctly.  Is this
> > expected?  Are spaces an illegal part of a style string?
> >
> > The documentation includes spaces in the example .ofs file there, so I
> had
> > copied that format when creating my text file.
>
> I guess we should be tolerant with spaces. The grammar of the style string
> itself seems to indicate that no spaces are expected in the style_def
> itself.
> But the format of the .ofs file is not really well defined.
>
> Perhaps Chaitanya will take care of that. See previous email.
>
> >
> > Cheers,
> > Nik.
> >
> > On 3 Aug 2014, at 8:45 pm, Even Rouault 
> wrote:
> > > Le dimanche 03 août 2014 12:41:56, Nik Sands a écrit :
> > >> Sorry, my mistake... I had my logging in the wrong place.  styleChars
> is
> > >>
> > >> actually of the form (including the leading space):
> > >>' PEN(c:#A08080,w:2pt); LABEL(c:#00,s:18pt,t:{title})'
> > >
> > > The issue must be the leading space before PEN, and potentially LABEL
> > > too.
> > >
> > >> On 3 Aug 2014, at 8:35 pm, Nik Sands  wrote:
> > >>> On one of the iterations through this code, styleChars is:
> > >>>   'vegetation_low: BRUSH(fc:#A0F0A0); LABEL(c:#004000,s:18pt,t:
> {title})'
> > >>>
> > >>> So perhaps the inclusion of the style name is the problem?
> > >>>
> > >>> This was read into a style table from a text file using
> > >>> 'OGR_STBL_LoadStyleTable()'.  I had assumed that a similar format to
> > >>> .ofs was suitable.  If this is not the case, how should I read a
> style
> > >>> table from a text file in such a way that I can distinguish the
> various
> > >>> styles by name?
> > >>>
> > >>> In guess my more general question is:  What is the correct way to
> read
> > >>> styles from an arbitrary text file into a style table, and then use a
> > >>> style manager to get the various parts/tools?
> > >>>
> > >>> On 3 Aug 2014, at 8:26 pm, Even Rouault <
> even.roua...@mines-paris.org>
> > >
> > > wrote:
> >  Le dimanche 03 août 2014 12:11:42, Nik Sands a écrit :
> > > I'm just starting out using the styles features of OGR (using the C
> > > API) but at struggling with a few elements of it.
> > >
> > > My code (copied below) fails to get any OGRStyleToolH.  Ie, the
> "if (
> > > tool )" block never gets run, because 'tool' is always NULL at the
> > > point indicated by the comment.  But the execution does reach that
> > > point in the code which indicates that the OGRStyleMrgH does in
> fact
> > > include at least one part (tool).
> > >
> > > I'd be grateful if somebody could point out what I'm doing wrong.
> > 
> >  Nothing strikes me as wrong. A potential explanation is that
> >  styleChars doesn't contain a valid OGR Feature Style string.
> >  GetPartCount() counts the number of ";" separating style parts, but
> it
> >  doens't check that each style part actually begins by a recognized
> >  tool name (PEN, BRUSH, SYMBOL, LABEL). OGR_SM_GetPart() does this
> >  check however and if it cannot recognize it it returns a NULL tool.
> > 
> > > Thanks,
> > > Nik.
> > >
> > >
> > > ---
> > >
> > > const char *styleChars = OGR_STBL_GetNextStyle(table) ) )
> > > NSString *styleName = [NSString
> > >
> > > stringWithUTF8String:OGR_STBL_GetLastStyleName(table)];
> OGRStyleMgrH
> > > styleMgr = OGR_SM_Create(NULL);
> > >
> > > OGR_SM_InitStyleString(styleMgr, styleChars);
> > >
> > >
> > > for ( int i = 0; i < OGR_SM_GetPartCount(styleMgr, NULL);
> i++ )
> > > {
> > >
> > > OGRStyleToolH tool = OGR_SM_GetPart(styleMgr, i,
> NULL);
> > >
> > > if ( tool )  //  'tool' always NULL here
> > > {
> > >
> > > switch ( OGR_ST_GetType(tool) )
> > > {
> > >
> > > case OGRSTCPen:
> > > self.pen = tool;
> > > break;
> > >
> > > case OGRSTCBrush:
> > > self.brush = tool;
> > > break;
> > >
> > > case OGRSTCSymbol:
> > > self.symbol = tool;
> > > break;
> > >
> > > case OGRSTCLabel:
> > > self.label = tool;
> > > break;
> > >
> > > 

Re: [gdal-dev] styles .ofs and OGR_STBL_GetNextStyle()

2014-08-01 Thread Chaitanya kumar CH
Nik,

This is a good idea. The doc you specified needs a correction. The
version string and style field lines are supposed to be commented out
with a #.

The OGRStyleTable class has methods to save and load style tables.
They assume neither empty lines nor comments.
There is one method to Print that saves the styletable into a file in
the .ofs format. We can implement a method that loads a styletable
from such file. Do you have any other suggestions?

I suggest you create a ticket on this at http://trac.osgeo.org/gdal/#BugTracking


On Wed, Jul 30, 2014 at 10:17 AM, Nik Sands  wrote:
> Hi Devs,
>
> I'm just planning to convert my own 'in-house' drawing styles management to 
> using the styles management built into OGR.  The documentation at 
> http://www.gdal.org/ogr_feature_style.html suggests that styles can be in a 
> '.ofs' file to be automatically associated with a data source of the same 
> name as the .ofs file.
>
> But how about if the .ofs file is a stand-alone file passed directly to 
> OGR_STBL_LoadStyleTable()?  Eg, OGR_STBL_LoadStyleTable(table, 
> "/path/to/styles.ofs")
>
> In this case the first two calls to 'OGR_STBL_GetNextStyle(table)' will 
> return the 'styles':
>
> OFS-Version :  1.0
> 2014-07-30 14:38:36.392 Maps n Trax[47458:60b] StyleField :  "style"
>
> Which are of course not styles at all, but part of the .ofs specification.
>
> From this, I assume that files passed into OGR_STBL_LoadStyleTable() should 
> in fact NOT be .ofs files, but merely plain text files with raw style strings 
> only (and no .ofs specifications).
>
> Is this correct?
>
> Would there be any advantage on getting OGR_STBL_LoadStyleTable() to ignore 
> the first line or two if it is an .ofs file and those two lines match the 
> spec?
>
> Cheers,
> Nik.
>
>
> OFS-Version: 1.0
> StyleField: "style"
>
> DefaultStyle: SYMBOL(c:#00,id:"ogr-sym-3",s:5pt); PEN(c:#00,w:2pt); 
> BRUSH(fc:#80808080); LABEL(c:#00,s:14pt,t:{title})
>
> locality: LABEL(c:#00,s:24pt,t:{title})
> town: SYMBOL(c:#80,id:"ogr-sym-3",s:10pt); 
> LABEL(c:#80,s:24pt,t:{title})
> city: SYMBOL(c:#80,id:"ogr-sym-3",s:15pt); 
> LABEL(c:#80,s:24pt,t:{title})
> region: PEN(c:#00,w:2pt); BRUSH(fc:#80808080); 
> LABEL(c:#00,s:28pt,t:{title})
> country: PEN(c:#00,w:2pt); BRUSH(fc:#80808080); 
> LABEL(c:#00,s:32pt,t:{title})
>
> vegetation_low: BRUSH(fc:#A0F0A0); LABEL(c:#004000,s:18pt,t:{title})
> vegetation_medium: BRUSH(fc:#80C080); LABEL(c:#004000,s:18pt,t:{title})
> vegetation_high: BRUSH(fc:#008000); LABEL(c:#004000,s:18pt,t:{title})
> water: SYMBOL(c:#80,id:"ogr-sym-3",s:2pt); PEN(c:#80,w:2pt,p:"18pt 
> 8pt"); BRUSH(fc:#8080C0); LABEL(c:#80,s:18pt,t:{title})
> contour: PEN(c:#808080,w:1pt); LABEL(c:#808080,s:12pt,t:{elevation})
>
> road_unsealed: PEN(c:#A08080,w:2pt,p:"10pt 6pt"); 
> LABEL(c:#00,s:18pt,t:{title})
> road_minor: PEN(c:#A08080,w:2pt); LABEL(c:#00,s:18pt,t:{title})
> road_medium: PEN(c:#A0,w:4pt); LABEL(c:#00,s:18pt,t:{title})
> road_major: PEN(c:#A0,w:6pt); LABEL(c:#00,s:18pt,t:{title})
>
> route: PEN(c:#00,w:2pt,p:"2pt 4pt"); LABEL(c:#00,s:18pt,t:{title})
> track: PEN(c:#00,w:2pt,p:"10pt 6pt"); LABEL(c:#00,s:18pt,t:{title})
> rail: PEN(c:#00,w:4pt,p:"2pt 5pt"); LABEL(c:#00,s:18pt,t:{title})
> cable: PEN(c:#00,w:2pt,p:"1pt 6pt"); LABEL(c:#00,s:18pt,t:{title})
> ferry: PEN(c:#80,w:2pt,p:"18pt 8pt"); LABEL(c:#80,s:18pt,t:{title})
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Unable to identify feature at selected position with gdal.1.11 with geos-3.4.2

2014-07-31 Thread Chaitanya kumar CH
Pratap,

Obviously only the first of the five polygons should be identified. I
tested with postgis using geos with version "3.4.2-CAPI-1.8.2 r3921".

So, the issue is probably not with geos. Please tell me if you find
any solution to the issue.


On Thu, Jul 31, 2014 at 1:51 PM, Pratap Chelamilla
 wrote:
> Hi Chaitanya,
>
> 82.4626 23.0721 0.00202492
>
>
> geometry->exportToWkt(&aftertrans)
>
> aftertrans POLYGON ((82.123893241937822
> 23.126845863962984,82.381596352429924 23.475093310573939,82.646264411854261
> 23.259179893675146,82.715913901176449 22.813423162013123,82.388561301362145
> 22.820388110945341,82.388561301362145 22.820388110945341,82.123893241937822
> 23.126845863962984))
>
>
> geometry->exportToWkt(&aftertrans)
>
> aftertrans POLYGON ((83.516883028381642
> 22.653229336572082,83.886025321789262 22.778598417352029,84.192483074806901
> 22.096033421994552,83.844235628195946 22.033348881604581,83.816375832467074
> 22.054243728401239,83.516883028381642 22.653229336572082))
>
>
> geometry->exportToWkt(&aftertrans)
>
> aftertrans POLYGON ((83.379917111984923
> 23.359672759378359,83.685680326555683 23.373847213033955,83.701879702162074
> 23.361697681329158,83.560135165606098 23.16933009600319,83.43907116543
> 23.140981188691995,83.379917111984923 23.359672759378359))
>
>
> geometry->exportToWkt(&aftertrans)
>
> aftertrans POLYGON ((82.748141463335443
> 22.592227340025289,83.064029287660176 22.772445393646457,83.185524604708164
> 22.569953198566491,83.084278507168179 22.357336393732528,82.729917165778232
> 22.367461003486525,82.748141463335443 22.592227340025289))
>
>
> geometry->exportToWkt(&aftertrans)
>
> aftertrans POLYGON ((82.814963887711826
> 23.064034154561607,83.185524604708164 23.151105798445993,83.213873512019362
> 22.991136964332821,82.997206863283793 22.962788057021626,82.997206863283793
> 22.962788057021626,82.814963887711826 23.064034154561607))
>
>
> selected Feature 5
>
>
>
> If i select any feature it is selecting the last created feature i.e feature
> 5.
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Thu, Jul 31, 2014 at 11:42 AM, Chaitanya kumar CH
>  wrote:
>>
>> Pratap,
>> Provide the EWKT of a set of geometry(after transform) and geom that are
>> failing.
>>
>>
>> On Thu, Jul 31, 2014 at 11:14 AM, Pratap Chelamilla
>>  wrote:
>>>
>>> Hi Chaitanya,
>>>
>>> yes, this is happening for every data source,
>>>
>>>
>>> OGRFeature* feature = poLayer->GetFeature(shapeList[loop]);
>>>OGRGeometry* geometry = feature->GetGeometryRef();
>>> if (cordinateTransform)
>>> geometry->transform(cordinateTransform);
>>> OGRGeometry* geom = point->Buffer(tDelta);
>>>
>>> if(geometry->Contains(geom)|| geometry->Intersects(geom)||
>>> geometry->Equals(geom))
>>> {
>>> identifiedRecordIndex = feature->GetFID();
>>> }
>>>
>>>
>>> It is working with the earlier version of gdal,After checking the
>>> condition it is not going in.
>>>
>>>
>>>
>>> On Thu, Jul 31, 2014 at 10:26 AM, Chaitanya kumar CH
>>>  wrote:
>>>>
>>>> Pratap,
>>>>
>>>> Can you provide a code snippet? Is this happening for every data source?
>>>> How far is the other feature? Is the distance consistent?
>>>>
>>>>
>>>> On Wed, Jul 30, 2014 at 5:58 PM, pratap chelamilla
>>>>  wrote:
>>>>>
>>>>> Hi ,
>>>>>
>>>>> Unable to identify feature at selected Position,Earlier Version of gdal
>>>>> 1.9
>>>>> with geos-3.1.1 Working fine, But I have build the newer version
>>>>> gdal-1.11
>>>>> with geos-.3.4.2, It is identifying the feature but not exactly at the
>>>>> same
>>>>> place, it is showing feature from different position.
>>>>>
>>>>>
>>>>> There's some special thing I should be doing? I'd appreciate any help.
>>>>>
>>>>> Thank you very much in advance.
>>>>>
>>>>> GDAL_VER='1.11.0'
>>>>> GDAL_VERSION_MAJOR='1'
>>>>> GDAL_VERSION_MINOR='11'
>>>>> GDAL_VERSION_REV='0'
>>>>> GEOS_CFLAGS='-I/d/gdal/geos-3.4.2_build/include'
>>

Re: [gdal-dev] Unable to identify feature at selected position with gdal.1.11 with geos-3.4.2

2014-07-30 Thread Chaitanya kumar CH
Pratap,

Can you provide a code snippet? Is this happening for every data source?
How far is the other feature? Is the distance consistent?


On Wed, Jul 30, 2014 at 5:58 PM, pratap chelamilla <
pratap.chelami...@amigooptima.in> wrote:

> Hi ,
>
> Unable to identify feature at selected Position,Earlier Version of gdal 1.9
> with geos-3.1.1 Working fine, But I have build the newer version gdal-1.11
> with geos-.3.4.2, It is identifying the feature but not exactly at the same
> place, it is showing feature from different position.
>
>
> There's some special thing I should be doing? I'd appreciate any help.
>
> Thank you very much in advance.
>
> GDAL_VER='1.11.0'
> GDAL_VERSION_MAJOR='1'
> GDAL_VERSION_MINOR='11'
> GDAL_VERSION_REV='0'
> GEOS_CFLAGS='-I/d/gdal/geos-3.4.2_build/include'
> GEOS_CONFIG='/d/gdal/geos-3.4.2_build/bin/geos-config'
> GEOS_LIBS='-L/d/gdal/geos-3.4.2_build/lib -lgeos_c'
>
>
>
> --
> Regards,
> Pratap.
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/Unable-to-identify-feature-at-selected-position-with-gdal-1-11-with-geos-3-4-2-tp5154190.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] warp taking time

2014-07-14 Thread Chaitanya kumar CH
Adiba,

Do you really need to warp the rasters? Aren't the source and destination
in the same SRS?


On Tue, Jul 15, 2014 at 9:25 AM, adiba nizami 
wrote:

> I am using gdal1.5 , considering version change not an optioncan you
> please tell how I can make use of gdal warp ?...
>
>
>
> On Mon, Jul 14, 2014 at 1:22 PM, Chaitanya kumar CH <
> chaitanya...@gmail.com> wrote:
>
>> Adiba,
>>
>> I noticed that your source and target projections are same. Why not use
>> gdalbuildvrt and gdal_translate and skip the warping process? You create a
>> virtual mosaic (and assign the projection if needed) with buildvrt. You can
>> create a tiff file from the vrt file using gdal_translate.
>>
>>
>> On Mon, Jul 14, 2014 at 11:12 AM, adiba nizami 
>> wrote:
>>
>>> Sorry for the late reply. Here is the command i  gave :
>>>
>>> gdalwarp --config GDAL_CACHEMAX 512 -s_srs "+proj=aea +lat_1=28
>>> +lat_2=12 +lat_0=20 +lon_0=87 +x_0=200 +y_0=200 +ellps=WGS84
>>> +datum=WGS84 +units=m +no_defs" -t_srs "+proj=aea +lat_1=28 +lat_2=12
>>> +lat_0=20 +lon_0=87 +x_0=200 +y_0=200 +ellps=WGS84 +datum=WGS84
>>> +units=m +no_defs" -te -138559.10 571316.50 3010515.63 4012751.95 -tr 18 18
>>> -wm 512 -co "BIGTIFF=YES" -srcnodata 255 -dstnodata 255  file1.tif
>>> file2.tif . file28.tif output.tif
>>>
>>>
>>>
>>> On Thu, Jul 10, 2014 at 7:23 PM, Thornton, Michele M. <
>>> thornto...@ornl.gov> wrote:
>>>
>>>>  Hello,
>>>>
>>>>
>>>>
>>>> I’m interested in this thread.  One comment I can add about
>>>> gdal_merge.py is that it does not properly handle nodata values from the
>>>> full (padded) extent of the input files.  gdalwarp, which can be VERY slow,
>>>> does handle the nodata values correctly.
>>>>
>>>>
>>>>
>>>> Michele Thornton
>>>>
>>>>
>>>>
>>>> *From:* gdal-dev-boun...@lists.osgeo.org [mailto:
>>>> gdal-dev-boun...@lists.osgeo.org] *On Behalf Of *bas smit
>>>> *Sent:* Thursday, July 10, 2014 7:52 AM
>>>> *To:* Chaitanya kumar CH
>>>> *Cc:* gdal dev
>>>> *Subject:* Re: [gdal-dev] warp taking time
>>>>
>>>>
>>>>
>>>> I am wondering why you are using gdalwarp for mosaicing images having same
>>>> projection instead of gdal_merge.py?
>>>>
>>>>
>>>>
>>>> Bas Smit
>>>>
>>>>
>>>>
>>>> On Thu, Jul 10, 2014 at 7:14 PM, Chaitanya kumar CH <
>>>> chaitanya...@gmail.com> wrote:
>>>>
>>>> garfy,
>>>>
>>>>
>>>>
>>>> Please provide the gdalwarp command you used. Did you modify
>>>> GDAL_CACHEMAX?
>>>>
>>>>
>>>>
>>>> On Thu, Jul 10, 2014 at 3:26 PM, garfy  wrote:
>>>>
>>>> Dear All,
>>>>
>>>> I am trying to generate mosaic of 28 input images using *gdalwarp*.
>>>> All are in same projection. It has taken 5 days to generate the final
>>>> output.
>>>> Please find the gdalinfo of input and output attached. The input files
>>>> are
>>>> passed to warp in the order in which the gdalinfo is present in the
>>>> attachement.
>>>>
>>>> Any input on improving the time would be really helpful.
>>>>
>>>>
>>>> Thanks
>>>> input_files_gdalinfo.txt
>>>> <
>>>> http://osgeo-org.1560.x6.nabble.com/file/n5150453/input_files_gdalinfo.txt
>>>> >
>>>> final_output_gdalinfo.txt
>>>> <
>>>> http://osgeo-org.1560.x6.nabble.com/file/n5150453/final_output_gdalinfo.txt
>>>> >
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://osgeo-org.1560.x6.nabble.com/warp-taking-time-tp5150453.html
>>>> Sent from the GDAL - Dev mailing list archive at Nabble.com.
>>>> ___
>>>> gdal-dev mailing list
>>>> gdal-dev@lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best regards,
>>>> Chaitanya kumar CH.
>>>>
>>>> +91-9494447584
>>>> 17.2416N 80.1426E
>>>>
>>>>
>>>> ___
>>>> gdal-dev mailing list
>>>> gdal-dev@lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>>
>>>>
>>>>
>>>> ___
>>>> gdal-dev mailing list
>>>> gdal-dev@lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>>
>>>
>>>
>>>
>>> --
>>> Regards,
>>> Adiba Khan
>>>
>>
>>
>>
>> --
>> Best regards,
>> Chaitanya kumar CH.
>>
>> +91-9494447584
>> 17.2416N 80.1426E
>>
>
>
>
> --
> Regards,
> Adiba Khan
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] warp taking time

2014-07-14 Thread Chaitanya kumar CH
Adiba,

I noticed that your source and target projections are same. Why not use
gdalbuildvrt and gdal_translate and skip the warping process? You create a
virtual mosaic (and assign the projection if needed) with buildvrt. You can
create a tiff file from the vrt file using gdal_translate.


On Mon, Jul 14, 2014 at 11:12 AM, adiba nizami 
wrote:

> Sorry for the late reply. Here is the command i  gave :
>
> gdalwarp --config GDAL_CACHEMAX 512 -s_srs "+proj=aea +lat_1=28 +lat_2=12
> +lat_0=20 +lon_0=87 +x_0=200 +y_0=200 +ellps=WGS84 +datum=WGS84
> +units=m +no_defs" -t_srs "+proj=aea +lat_1=28 +lat_2=12 +lat_0=20
> +lon_0=87 +x_0=200 +y_0=200 +ellps=WGS84 +datum=WGS84 +units=m
> +no_defs" -te -138559.10 571316.50 3010515.63 4012751.95 -tr 18 18 -wm 512
> -co "BIGTIFF=YES" -srcnodata 255 -dstnodata 255  file1.tif file2.tif .
> file28.tif output.tif
>
>
>
> On Thu, Jul 10, 2014 at 7:23 PM, Thornton, Michele M.  > wrote:
>
>>  Hello,
>>
>>
>>
>> I’m interested in this thread.  One comment I can add about gdal_merge.py
>> is that it does not properly handle nodata values from the full (padded)
>> extent of the input files.  gdalwarp, which can be VERY slow, does handle
>> the nodata values correctly.
>>
>>
>>
>> Michele Thornton
>>
>>
>>
>> *From:* gdal-dev-boun...@lists.osgeo.org [mailto:
>> gdal-dev-boun...@lists.osgeo.org] *On Behalf Of *bas smit
>> *Sent:* Thursday, July 10, 2014 7:52 AM
>> *To:* Chaitanya kumar CH
>> *Cc:* gdal dev
>> *Subject:* Re: [gdal-dev] warp taking time
>>
>>
>>
>> I am wondering why you are using gdalwarp for mosaicing images having same
>> projection instead of gdal_merge.py?
>>
>>
>>
>> Bas Smit
>>
>>
>>
>> On Thu, Jul 10, 2014 at 7:14 PM, Chaitanya kumar CH <
>> chaitanya...@gmail.com> wrote:
>>
>> garfy,
>>
>>
>>
>> Please provide the gdalwarp command you used. Did you modify
>> GDAL_CACHEMAX?
>>
>>
>>
>> On Thu, Jul 10, 2014 at 3:26 PM, garfy  wrote:
>>
>> Dear All,
>>
>> I am trying to generate mosaic of 28 input images using *gdalwarp*.
>> All are in same projection. It has taken 5 days to generate the final
>> output.
>> Please find the gdalinfo of input and output attached. The input files are
>> passed to warp in the order in which the gdalinfo is present in the
>> attachement.
>>
>> Any input on improving the time would be really helpful.
>>
>>
>> Thanks
>> input_files_gdalinfo.txt
>> <
>> http://osgeo-org.1560.x6.nabble.com/file/n5150453/input_files_gdalinfo.txt
>> >
>> final_output_gdalinfo.txt
>> <
>> http://osgeo-org.1560.x6.nabble.com/file/n5150453/final_output_gdalinfo.txt
>> >
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://osgeo-org.1560.x6.nabble.com/warp-taking-time-tp5150453.html
>> Sent from the GDAL - Dev mailing list archive at Nabble.com.
>> ___
>> gdal-dev mailing list
>> gdal-dev@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>>
>>
>>
>>
>> --
>> Best regards,
>> Chaitanya kumar CH.
>>
>> +91-9494447584
>> 17.2416N 80.1426E
>>
>>
>> ___
>> gdal-dev mailing list
>> gdal-dev@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>>
>>
>> ___
>> gdal-dev mailing list
>> gdal-dev@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
>
>
> --
> Regards,
> Adiba Khan
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] warp taking time

2014-07-10 Thread Chaitanya kumar CH
garfy,

Please provide the gdalwarp command you used. Did you modify GDAL_CACHEMAX?


On Thu, Jul 10, 2014 at 3:26 PM, garfy  wrote:

> Dear All,
>
> I am trying to generate mosaic of 28 input images using *gdalwarp*.
> All are in same projection. It has taken 5 days to generate the final
> output.
> Please find the gdalinfo of input and output attached. The input files are
> passed to warp in the order in which the gdalinfo is present in the
> attachement.
>
> Any input on improving the time would be really helpful.
>
>
> Thanks
> input_files_gdalinfo.txt
> <
> http://osgeo-org.1560.x6.nabble.com/file/n5150453/input_files_gdalinfo.txt
> >
> final_output_gdalinfo.txt
> <
> http://osgeo-org.1560.x6.nabble.com/file/n5150453/final_output_gdalinfo.txt
> >
>
>
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/warp-taking-time-tp5150453.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] gdal_calc.py not saving correct statistics (min/max) to new rasters in some cases?

2014-06-27 Thread Chaitanya kumar CH
Patrick,
Can you send me the sample data?

--
Best regards,
Chaitanya Kumar CH
On 27-Jun-2014 9:56 am, "Patrick Sunter"  wrote:

> No comments on the below anyone?
>
> It does seem like a genuine bug that gdal_calc.py can produce output with
> statistics not up to date?
>
> Should I create an issue in the issue tracker?
>
> -- Patrick.
>
>
> On Thu, Jun 19, 2014 at 2:45 PM, Patrick Sunter 
> wrote:
>
>> Hi there,
>>
>> I've been using gdal_calc.py as part of a workflow where I need to
>> compute the average of several raster files and save as a new output.
>> (Using a binary build of GDAL, v 1.10.0, on Mac Os X).
>>
>> It is a fairly standard calc operation (e.g. "(A+B+C)/3") but because the
>> original data are GeoTiff's storing data in a Byte format, I first create
>> VRT files referencing these with data type set to be Float32, then perform
>> the calc operation with these VRT files as input. This is to prevent
>> 'overflow' problems in the midst of the averaging operation given the size
>> limit of the Byte format (see
>> http://gis.stackexchange.com/questions/33152/why-do-i-get-different-results-with-gdal-calc-within-the-osgeo4w-shell-and-qgis
>> )
>>
>> The output GeoTiff created by gdal_calc.py seems to be have correct
>> values at every point - but the saved statistics metadata are wrong -
>> specifically, the minimum value.
>>
>> An example is doing a gdalinfo -stats on one of these files, I get the
>> following:
>>   Min=21.000 Max=128.000
>>   Minimum=21.000, Maximum=128.000, Mean=81.692, StdDev=29.397
>>
>> but I know the minimum value should be 0, and this is confirmed by
>> inspection in QGIS. I also wrote a script to open up the raster in Python
>> and run the following queries:
>>
>> print "GetStatistics(): " + str(band_in.GetStatistics(True, True))
>> print "ComputeRasterMinMax(): " + str(band_in.ComputeRasterMinMax())
>> print "Hand calc. min: " + str(min(map(min, raster_values)))
>>
>> I get:
>> GetStatistics(): [21.0, 128.0, 81.692344139650999, 29.397484687917]
>> ComputeRasterMinMax(): (0.0, 120.0)
>> Hand calc. min: 0
>>
>> So you can see that ComputeRasterMinMax() is returning the right values,
>> as well as my manual calc using Python's min function.
>>
>> As a user I presume its reasonable for the output of a   gdal_calc.py to
>> have latest stats stored correctly on any output it produces? So what is
>> going wrong?
>>
>> Maybe its something to do with doing a calc on a set of VRT files using a
>> different type to the original. This is also a case where the output file
>> already exists.
>>
>> Looking at the gdal_calc.py I guess a simple fix is to force an update of
>> statistic values using ComputeRasterMinMax() before closing the newly
>> created file, but maybe there is a better solution.
>>
>> cheers, Patrick.
>>
>> BTW example gdal_calc.py command:
>> gdal_calc.py -A
>> ./Comparison-PTV-BZE-V1-201406-ForPres-30minWindows-3eachSide/MelbTrainTramBus-BZE-autostops-withcongestion-WithMotorways-updated-20140514/SURREY_HILLS-21_45_00-BZEV1.vrt
>> -B
>> ./Comparison-PTV-BZE-V1-201406-ForPres-30minWindows-3eachSide/MelbTrainTramBus-BZE-autostops-withcongestion-WithMotorways-updated-20140514/SURREY_HILLS-21_50_00-BZEV1.vrt
>> -C
>> ./Comparison-PTV-BZE-V1-201406-ForPres-30minWindows-3eachSide/MelbTrainTramBus-BZE-autostops-withcongestion-WithMotorways-updated-20140514/SURREY_HILLS-21_55_00-BZEV1.vrt
>> -D
>> ./Comparison-PTV-BZE-V1-201406-ForPres-30minWindows-3eachSide/MelbTrainTramBus-BZE-autostops-withcongestion-WithMotorways-updated-20140514/SURREY_HILLS-22_00_00-BZEV1.vrt
>> -E
>> ./Comparison-PTV-BZE-V1-201406-ForPres-30minWindows-3eachSide/MelbTrainTramBus-BZE-autostops-withcongestion-WithMotorways-updated-20140514/SURREY_HILLS-22_05_00-BZEV1.vrt
>> -F
>> ./Comparison-PTV-BZE-V1-201406-ForPres-30minWindows-3eachSide/MelbTrainTramBus-BZE-autostops-withcongestion-WithMotorways-updated-20140514/SURREY_HILLS-22_10_00-BZEV1.vrt
>> -G
>> ./Comparison-PTV-BZE-V1-201406-ForPres-30minWindows-3eachSide/MelbTrainTramBus-BZE-autostops-withcongestion-WithMotorways-updated-20140514/SURREY_HILLS-22_15_00-BZEV1.vrt
>> --outfile=./Comparison-PTV-BZE-V1-201406-ForPres-30minWindows-3eachSide/MelbTrainTramBus-BZE-autostops-withcongestion-WithMotorways-updated-20140514/SURREY_HILLS-22_00_00-BZEV1-avg7.tiff
>> --calc="(A+B+C+D+E+F+G)/7" --type=Byte --overwrite
>>
>> And full testing script on output:
>> #!/usr/bin/env python
>>

Re: [gdal-dev] ogr2ogr.py

2014-06-26 Thread Chaitanya kumar CH
Mike,

Thanks for the update. But, I have to mention that the python scripts are
primarily to serve as examples.

You can submit a ticket (bug report) on gdal trac and attach a diff patch
along with the description.
http://trac.osgeo.org/gdal/#BugTracking

One of the committers should pick it up.



On Fri, Jun 27, 2014 at 11:39 AM, Mike Saunt 
wrote:

> Hi
> ​
> I've updated ogr2ogr.py
> <http://svn.osgeo.org/gdal/trunk/gdal/swig/python/samples/ogr2ogr.py>
> with a really small change which is to accept the -dialect parameter that
> is now available.  I'm wondering how / what the process is for submitting
> back.
> ​
> ​If someone could let me know or pointing me to the relevant web page with
> details it would be much appreciated
>
> Many thanks
> Mike​
>
> --
> ​​
>
> --
>
> *Mike Saunt*
> Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
> 7RL, UK
> t:+44 1372 744 009 m:+44 788  680
> *
> iShare - Data integration and publishing platform
> <http://www.astuntechnology.com>
>  See the new Helpdesk and Customer portal
> <http://support.astuntechnology.com>
> *
>
> See our customer commendations and awards
> <http://astuntechnology.com/customers/awards-and-commendations/>
>
>  Company registration no. 5410695. Registered in England and Wales.
> Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
> 864201149.
>
>  <https://astuntechnology.com/ishare/2014-enterprise-gis-roadshows/>
> _______
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Store GDAL Result Raster in PostGIS Directly

2014-05-28 Thread Chaitanya kumar CH
zlzhao1104,

Two things:
You need to specify the output data format using the -of option.
PostGIS raster driver doesn't support writing yet. It's being implemented
now.

It is more efficient to do that directly using an SQL command. Refer to
PostGIS docs.

--
Best regards,
Chaitanya Kumar CH
On 29-May-2014 6:42 am, "zlzhao1104"  wrote:

> Hi I'm a new GDAL/PostGIS user.  This question might be simple to you:
>
> I need to use gdal_translate to clip a raster, which is already stored in
> PostGIS.  I could do it by using "PG" to link to my PostGIS database and I
> could store the result as a tiff file on my disk:
>
> gdal_translate -projwin -120.01969132 35.8820930603 -119.47058351
> 35.1172643251 "PG: dbname=geodb host=localhost user=postgres
> password=xx
> port=5432 mode=2 schema=public table=srtm_ca" test.tiff
>
> I'm wondering if there is a way to store the result raster directly to my
> PostGIS database as a table.  I tried to replace "test.tiff" above to
> "PG:.." but GDAL still generated a raster on my disk named "PG:..".
>
> Thanks in advance for any ideas and sorry to bother others.
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/Store-GDAL-Result-Raster-in-PostGIS-Directly-tp5143022.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] GDAL 1.11: SQLite & tables

2014-05-28 Thread Chaitanya kumar CH
David,

This feature is not available in SQLite driver. It just avoids getting a
long list of tables and views with potentially no spatial data.


On Wed, May 28, 2014 at 5:16 PM, David Tran  wrote:

> Hi
>
> Is there a something similiar to "tables=table1,table2" from pg for sqlite?
>
> pg:
> http://www.gdal.org/drv_pg_advanced.html
>
> sqlite:
> http://www.gdal.org/drv_sqlite.html
>
>
> thanks in advance.
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Convert in-memory raster

2014-05-13 Thread Chaitanya kumar CH
Anthony,

The closest methods in the gdal algorithms is to use
GDALComputeMatchingPoints(). You'll get a set of GCPs that match one raster
to another. Please report your experience with it here.

--
Best regards,
Chaitanya Kumar CH
On 12-May-2014 11:40 pm, "Baker, Anthony W" 
wrote:

> I am interested in registering two images together.  In order to do that I
> would like to align the coordinate frames, the pixel sizes, and the
> rotation of the two frames.  Is there an easy "in-memory" method for doing
> this?
>
> Thank you,
>
> Anthony
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] gdal_contour failes after creating 4gig+ file

2014-04-29 Thread Chaitanya kumar CH
Timothy,

I just ran gdal_contour (from gdal-1.10.1) on
http://dds.cr.usgs.gov/srtm/version2_1/SRTM1/Region_01/N38W114.hgt.zip with
the options -i 10 and -a height. I got a shape file of ~95MB. Please check
your data file and gdal version.

BTW, you can directly save the contours into a postgis table instead of the
intermediate shapefiles by using the -f option.



On Tue, Apr 29, 2014 at 6:00 AM, Reaves, Timothy <
trea...@silverfieldstech.com> wrote:

> I am attempting to import contour information into a PostGIS-enabled
> database. I am trying to follow the information on this site:
> http://wiki.openstreetmap.org/wiki/Contours#Importing_the_SRTM3_data_.28deprecated.29
>  and
> am using the script. The page states that srtm_generate_hdr.sh is no longer
> needed, but, I can find no instructions that do not use this script.
>
> I am importing data from ds.cr.usgs.gov/srtm/version2_1/SRTM1/Region_01 .
> The first couple of files in that directory import. When the file
> N38W114.hgt.zip is processed, however, one of the intermediate files
> created by gdal_contour starts growing in size, and when it reaches just
> over four gig, the max file size, it fails. This particular data file isn't
> the largest that is imported. The error is:
> ERROR 1: Failed to write shape object. File size cannot reach 4294967228 +
> 808.
>
> So I'm not sure how to troubleshoot were exactly the issue is; I suppose
> the issue could be with the data file, but, as several other files imported
> fine, I think the issue may be with gdal_contour.  I've searched, and can
> find reference to this error, but related to NoData not being set, and it
> is in this file (NoData Value=-32768);
>
> Any help appreciated.
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Problems with large ASTER GeoTIFF

2014-04-15 Thread Chaitanya kumar CH
Nicole,
You should be able to perform those operations from qgis too. Crop it to
your extents, scale the pixel values and save as PNG.

--
Best regards,
Chaitanya Kumar CH
On 15-Apr-2014 8:21 pm, "Nicole Stoffels"  wrote:

> Thanks Chaitanya!
>
>
>> The problem is reading the source file itself. GDAL is unable to find
>> any valid pixels. Check if you are using the latest GDAL binaries. Use
>> "gdalinfo -version".
>>
>
> I just installed the latest gdal-version (1.10.1). But it did not solve my
> problems. I still get the same error while trying to display the min and
> max.
>
> Use qgis to view the input and output. GIMP can't
>
>> handle anything except basic pixel types.
>>
> But with qgis I can visualize my original large EU_DEM-files. :)
>
> Best regards
> Nicole
>
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Problems with large ASTER GeoTIFF

2014-04-15 Thread Chaitanya kumar CH
Nicole,

The problem is reading the source file itself. GDAL is unable to find any
valid pixels. Check if you are using the latest GDAL binaries. Use
"gdalinfo -version". Use qgis to view the input and output. GIMP can't
handle anything except basic pixel types. The -mm option should find some
valid pixels if everything is good.

Later, you should scale the pixel values to 0-255 range to represent them
in PNG.

--
Best regards,
Chaitanya Kumar CH
On 15-Apr-2014 4:40 pm, "Nicole Stoffels"  wrote:

> Thank you both for your answers. I have applied your suggestions.
>
> Making a single command works but does not change the result.
>
> Concerning the compression, I used LZW instead of NONE. However, it also
> does not make any difference.
>
> I also changed the srcwin parameters. I do not get any errors and the
> gdalinfo says that the subarea is within the original area.
>
> I skipped the png part to make it easier first. And after trying to open
> the new tif with gimp and getting an error message that the float32 data
> cannot be displayed I added the ot-flag. Here is my new command line:
>
> $ gdal_translate -ot Byte -srcwin 0 0 4000 4000 -co COMPRESS=LZW
> EUD_CP-DEMS_6500035000-AA.tif test.tif
>
> What I get is a completely black tif. Here are the two gdalinfo-outputs,
> that I get:
>
> $ gdalinfo -mm EUD_CP-DEMS_6500035000-AA.tif
> Driver: GTiff/GeoTIFF
> Files: EUD_CP-DEMS_6500035000-AA.tif
> Size is 4, 4
> Coordinate System is:
> PROJCS["ETRS89 / ETRS-LAEA",
> GEOGCS["ETRS89",
> DATUM["European_Terrestrial_Reference_System_1989",
> SPHEROID["GRS 1980",6378137,298.257222127,
> AUTHORITY["EPSG","7019"]],
> AUTHORITY["EPSG","6258"]],
> PRIMEM["Greenwich",0],
> UNIT["degree",0.0174532925199433],
> AUTHORITY["EPSG","4258"]],
> PROJECTION["Lambert_Azimuthal_Equal_Area"],
> PARAMETER["latitude_of_center",52],
> PARAMETER["longitude_of_center",10],
> PARAMETER["false_easting",4321000],
> PARAMETER["false_northing",321],
> UNIT["metre",1,
> AUTHORITY["EPSG","9001"]],
> AUTHORITY["EPSG","3035"]]
> Origin = (600.000,400.000)
> Pixel Size = (25.000,-25.000)
> Metadata:
>   TIFFTAG_DOCUMENTNAME=EUD_CP-DEMS_6500035000-AA.tif
>   TIFFTAG_IMAGEDESCRIPTION=File written by egcs_wrgtif 2.1
>   TIFFTAG_SOFTWARE=IDL 8.2, Exelis Visual Information Solutions, Inc.
>   TIFFTAG_DATETIME=2013:09:17 21:00:27
>   TIFFTAG_XRESOLUTION=100
>   TIFFTAG_YRESOLUTION=100
>   TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
>   AREA_OR_POINT=Area
> Image Structure Metadata:
>   COMPRESSION=LZW
>   INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  ( 600.000, 400.000) ( 37d47'0.49"E, 56d 7'28.33"N)
> Lower Left  ( 600.000, 300.000) ( 32d47'35.21"E, 47d45'16.08"N)
> Upper Right ( 700.000, 400.000) ( 51d32'27.75"E, 51d55'27.24"N)
> Lower Right ( 700.000, 300.000) ( 44d57'3.39"E, 44d18'11.63"N)
> Center  ( 650.000, 350.000) ( 41d41'39.51"E, 50d15'46.40"N)
> Band 1 Block=4x1 Type=Float32, ColorInterp=Gray
> ERROR 1: Failed to compute min/max, no valid pixels found in sampling.
>
> $ gdalinfo -mm test.tif
> Driver: GTiff/GeoTIFF
> Files: test.tif
> Size is 4000, 4000
> Coordinate System is:
> PROJCS["ETRS89 / ETRS-LAEA",
> GEOGCS["ETRS89",
> DATUM["European_Terrestrial_Reference_System_1989",
> SPHEROID["GRS 1980",6378137,298.2572221010002,
> AUTHORITY["EPSG","7019"]],
> AUTHORITY["EPSG","6258"]],
> PRIMEM["Greenwich",0],
> UNIT["degree",0.0174532925199433],
> AUTHORITY["EPSG","4258"]],
> PROJECTION["Lambert_Azimuthal_Equal_Area"],
> PARAMETER["latitude_of_center",52],
> PARAMETER["longitude_of_center",10],
> PARAMETER["false_easting",4321000],
> PARAMETER["false_northing",321],
> UNIT["metre",1,
> AUTHORITY["EPSG","9001"]],
> AUTHORITY["EPSG","3035"]]
> Origin = (600.000,400.000)
> Pixel Size = (25.000,-25.000)
> Metadata:
>

Re: [gdal-dev] gdal_retile x64 : No input files selected.

2014-04-11 Thread Chaitanya kumar CH
Imran,

You need to specify the resampling algorithm if you use the -r option.
Choose from near, bilinear, cubic, cubicspline, lanczos.
'near' is used if you don't specify the -r option.



On Fri, Apr 11, 2014 at 12:45 PM, Imran Rajjad  wrote:

> Hi list,
>
> I am using GDAL 10.1 x64 with Python 2.7.5 x64
>
> It seems python script is not able to find the input file
>
> W:\>gdal_retile.py -v -r -levels 4 -ps 2048 2048 -co "TILED=YES" -co
> "COMPRESS=JPEG" -targetDir w:\dem\dem_pyramid w:\dem\dem.tif
>
> 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]
>
> Usage: gdal_retile.py
> [-v] [-co NAME=VALUE]* [-of out_format]
> [-ps pixelWidth pixelHeight]
> [-ot  {Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/
>CInt16/CInt32/CFloat32/CFloat64}]
> [ -tileIndex tileIndexName [-tileIndexField fieldName]]
> [ -csv fileName [-csvDelim delimiter]]
> [-s_srs srs_def]  [-pyramidOnly] -levels numberoflevels
> [-r {near/bilinear/cubic/cubicspline/lanczos}]
> [-useDirForEachRow]
> -targetDir TileDirectory input_files
>
>
> Can somebody tell me what is wrong with the command
>
> below is GDAL info of the geotiff file
>
>
> ---GDALINFO--
>
> W:\>gdalinfo dem\dem.tif
> Driver: GTiff/GeoTIFF
> Files: dem\dem.tif
>dem\dem.tif.aux.xml
> Size is 30001, 24001
> Coordinate System is:
> GEOGCS["WGS 84",
> DATUM["WGS_1984",
> SPHEROID["WGS 84",6378137,298.257223563,
> AUTHORITY["EPSG","7030"]],
> AUTHORITY["EPSG","6326"]],
> PRIMEM["Greenwich",0],
> UNIT["degree",0.0174532925199433],
> AUTHORITY["EPSG","4326"]]
> Origin = (59.99958323244,40.000416763514124)
> Pixel Size = (0.0008333,-0.0008333)
> Metadata:
>   AREA_OR_POINT=Area
> Image Structure Metadata:
>   INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  (  59.9995833,  40.0004168) ( 59d59'58.50"E, 40d 0' 1.50"N)
> Lower Left  (  59.9995833,  19.9995834) ( 59d59'58.50"E, 19d59'58.50"N)
> Upper Right (  85.0004167,  40.0004168) ( 85d 0' 1.50"E, 40d 0' 1.50"N)
> Lower Right (  85.0004167,  19.9995834) ( 85d 0' 1.50"E, 19d59'58.50"N)
> Center  (  72.500,  30.001) ( 72d30' 0.00"E, 30d 0' 0.00"N)
> Band 1 Block=30001x1 Type=Int16, ColorInterp=Gray
>   Description = Layer_1
>   Min=-32768.000 Max=8469.000
>   Minimum=-32768.000, Maximum=8469.000, Mean=-339.616, StdDev=7609.851
>   NoData Value=0
>   Metadata:
> LAYER_TYPE=athematic
>
> STATISTICS_HISTOBINVALUES=35892220|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0
>
> |0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0
>
> |0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0
>
> |0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0
>
> |0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0
>
> |0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|147192240|103498980|58861348|42041116
>
> |24849760|20456436|19853444|32923904|23568064|14391364|11251344|9393020|9059076|
>
> 8846812|7765888|6834360|6443632|6328036|5700032|5445180|5022004|4646148|4389944|
>
> 4296656|024|4944940|5610800|6424704|8513544|9714796|11723868|13505128|117576
>
> 68|8901568|6243536|4127656|2605304|1385800|671944|286624|116272|41912|27716|1352
> 0|10816|5408|4056|2028|676|0|0|0|676|
> STATISTICS_HISTOMAX=8469
> STATISTICS_HISTOMIN=-32768
> STATISTICS_HISTONUMBINS=256
> STATISTICS_MAXIMUM=8469
> STATISTICS_MEAN=-339.61644644564
> STATISTICS_MEDIAN=414.8984375
> STATISTICS_MINIMUM=-32768
> STATISTICS_MODE=-68.34765625
> STATISTICS_SKIPFACTORX=26
> STATISTICS_SKIPFACTORY=26
> STATISTICS_STDDEV=7609.8514119626
>
>
>
> regards,
> Imran
> --
> I.R
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] gdal_rasterize

2014-04-08 Thread Chaitanya kumar CH
Jason,

Can you provide some sample data to reproduce the error?


On Wed, Apr 9, 2014 at 3:51 AM, Jason Mathis wrote:

> Hi all was wondering if anyone could help out here. I have been trying to
> rasterize a shp file using gdal_rasterize and I keep getting an error I
> have no idea about.
>
>
> gdal_rasterize(1844,0x7fff7a393310) malloc: *** error for object
> 0x7f8f40d032e0: pointer being freed was not allocated
> *** set a breakpoint in malloc_error_break to debug
>
>
> the command I am using is:
> gdal_rasterize -at -burn 1 -a $attribute -where “$attribute=‘value'" -ts
> 5000 5000 $shapefile $outfile
>
>
> version is:
> GDAL 1.10.0, released 2013/04/24
>
> I am running os x 10.9.2.
>
> It seems to happen randomly. I have about 10 different values I need to
> get out. Not sure what other info would be useful so please let me know.
>
> thanks!
>
> -jason
>
>
>
>
>
> This transmission contains confidential and privileged information
> intended solely for the party identified above. If you receive this message
> in error, you must not use it or convey it to others. Please destroy it
> immediately and contact the sender at (303) 386-3955 or by return e-mail to
> the sender.
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] alpha mask to data value

2014-04-02 Thread Chaitanya kumar CH
William,

Try gdalwarp after removing the mask band. If that didn't work try
gdal_merge.py with -init set to 255.


On Wed, Apr 2, 2014 at 1:44 AM, William Kyngesburye
wrote:

> I've wrestled with various nodata issues in the past, now it's hitting me
> again...
>
> I'm using Photoshop to delete collars on scanned maps, creating an alpha
> mask.  GDAL has no problem with this.  What I want to do is merge maps
> together (after rectification), then set any remaining nodata areas to
> white, RGB 255,255,255.  Just dropping the extra alpha band doesn't work
> because nodata is set to 0,0,0, which is black.  The a_nodata option in
> gdal_translate just defines what existing value in the data is nodata.
>
> I tried using gdalwarp with the -dstnodata option which should set nodata
> values in the output to a specific value, but it carries along the alpha
> band and ignores dstnodata.
>
>   gdalwarp -dstnodata "255 255 255" in.tif out.tif
>   Processing input file in.tif.
>   Using band 4 of source image as alpha.
>   Using band 4 of destination image as alpha.
>
>
> -
> William Kyngesburye 
> http://www.kyngchaos.com/
>
> First Pogril: Why is life like sticking your head in a bucket filled with
> hyena offal?
> Second Pogril: I don't know.  Why IS life like sticking your head in a
> bucket filled with hyena offal?
> First Pogril: I don't know either.  Wretched, isn't it?
>
> -HitchHiker's Guide to the Galaxy
>
>
> _______
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Regarding Raster GDAL driver

2014-03-21 Thread Chaitanya kumar CH
Kshitij and Varun have good GSoC proposals. Auto georeferencer and PostGIS
raster write support. They are from the same college studying under Dr.
Rajan. Kshitij proposed both ideas.

May I suggest that they work as a team with each being the primary coder of
their respective project?

--
Best regards,
Chaitanya Kumar CH
On 21-Mar-2014 6:24 pm, "Kshitij Kansal"  wrote:

> Hello
>
> I had been working on the Raster GDAL QGIS plugin from December last
> year(Which ultimately got discontinued), and the person, involved, Jorge,
> asked me to write a proposal in this one(Raster Driver). I had told him
> earlier that I was doing it for GDAL, so he said you can give at max 5
> proposals.
>
> Sure, I have withdrawn my proposal, but I need to clarify this.
> I had prepared this last night with the help of Jorge itself. I will
> contact Varun sir. Its not a problem.
>
> With Regards,
>
> Kshitij Kansal
>
> Lab For Spatial Informatics,
>
> IIIT Hyderabad
>
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Enquiry

2014-03-19 Thread Chaitanya kumar CH
Hao,

The extents for -clipsrc have to be represented in the source's reference
system. You can use gdaltransform [1] if you want to convert your lat/long
to the source's ref system.

[1]: http://www.gdal.org/gdaltransform.html


On Wed, Mar 19, 2014 at 1:16 PM, Tan Hao Feng  wrote:

>  Dear Sir/Madam,
>
> I'm a student in HSR, Rapperswil and I am trying to clip a SQLite file
>
> I converted .osm.pbf file of liechtenstein to a .sqlite file, and then
> tried to clip it with the following codes, (is it -clipsrc or -clipdst
>
> ogr2ogr -f "SQLite" liechtenstein.sqlite liechtenstein-latest.osm.pbg
> -skipfailures -dsco SPATIALITE=yes -clipsrc 47.1386361 9.5231616 47.1404971
> 9.5266377
>
>
> Also, I tried to clip the map of Singapore but was unsuccessful, the
> following is the code
>
> ogr2ogr -f "SQLite" singapore.sqlite
> malaysia-singapore-brunei-latest.osm.pbg -skipfailures -dsco -clipsrc
> singapore.geojson
>
> Do I have to convert to .shp file?
>
> Do you have any suggestions?
>
> Thank you!
> Hao Feng.
>
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] [RFC] [GDAL] Idea for GSoC, 2014

2014-03-15 Thread Chaitanya kumar CH
Kshitij,

As suggested you should plan to allow user to select the algorithm for key
point detection and matching.

I'll explain how to do that later. But essentially you may get some input
from the user to change the default algorithm to something else. So, all
the steps should be done independent of each other.

--
Best regards,
Chaitanya Kumar CH
On 16-Mar-2014 2:58 am, "Dmitriy Baryshnikov"  wrote:

>  Hi,
>
> I only proposed to use the exist API - GDALComputeMatchingPoints, or
> modify it to support new method BRISK. You have not to modify SimpleSurf,
> but only make it still working as now.
> GDAL is library, not the "Automatic geo-referencer utility" and some
> common methods and functions should be developed. This does not deny that
> such a tool can be developed but it must use this
> common methods and functions. For example see the console utilities in
> apps folder of GDAL source tree. They use GDAL functions and methods.
>
> Best regards,
> Dmitry
>
> 16.03.2014 1:15, Seth Price пишет:
>
> I have done something like this recently. You would be better off tearing
> out SURF & linking to OpenCV for all feature detection and extraction. Here
> is a link to the patch that OpenCV needs to support large & 16 bit imagery.
>
>  https://github.com/Itseez/opencv/pull/1932
>
>  ~Seth
>
>  via iPhone
>
> On Mar 15, 2014, at 12:50 PM, Kshitij Kansal  wrote:
>
>   Hello Again,
>
>  @Dimitriy - Currently the GDALComputeMatchingPoints  is using the
> SimpleSurf algorithm for matching points. Are you proposing that, I should
> implement the BRISK and then provide user the option of using either this
> or SimpleSurf(already implemented)?
> This is indeed a very interesting thought but the problem in this is that,
> the GDALComputeMatchingPoints is developed with respect to the correlator
> project and I feel that SimpleSurf algorithm implemented there won't work
> on my Automatic geo-referencer as I would be considering the Multispectral
> Imagery and Large Datasets which are not handled in the current
> implementation.* So this will require modification to SimpleSurf as well.*
>  I hope I have made my doubt clear? Please convey your views on this.
>
>  @Chaitanya - In comparison to the SURF, BRISK can definitely handle the
> large imagery to great extent. But there is going to be some threshold upto
> which this algorithm will work because we must not forget that these
> algorithms are developed for Normal RGB images for Computer Vision related
> work and there usage to Remote Sensing requires some modification. I will
> try to look for this thing in more detail and then get back to you.
>
>
>  Also, should I prepare my initial draft of proposal based this BRISK
> idea only?
> I have already started work in this direction and will soon post it, for
> review.
>
>  With Regards,
>
>   Kshitij Kansal
>
> Lab For Spatial Informatics,
>
> IIIT Hyderabad
>
>
>
> On Sat, Mar 15, 2014 at 12:29 AM, Chaitanya kumar CH <
> chaitanya...@gmail.com> wrote:
>
>> Kshitij,
>>
>> What is the performance of the proposed algorithms for very large
>> rasters? If one of them is good with large images that's a cleaner choice
>> without all the workaround with scaling the rasters.
>>
>> --
>> Best regards,
>> Chaitanya Kumar CH
>>  On 15-Mar-2014 12:22 am, "Dmitriy Baryshnikov" 
>> wrote:
>>
>>>   Hi,
>>>
>>> I think we need to decide it here, not to create lot of proposals. The
>>> second idea is very interesting. Maybe it worth to create some common
>>> interface (or API) to add new methods BRISK, SURF, SIFT etc.
>>> You can develop you realisation of BRISK and demonstrate how-to one can
>>> use it via such common interface.
>>> E.g. in GDALComputeMatchingPoints add enum for algorithms or use exist
>>> papszOptions.
>>>
>>> Best regards,
>>> Dmitry
>>>
>>>
>>>___
>> gdal-dev mailing list
>> gdal-dev@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
>___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
>
> ___
> gdal-dev mailing 
> listgdal-dev@lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] [RFC] [GDAL] Idea for GSoC, 2014

2014-03-14 Thread Chaitanya kumar CH
Kshitij,

What is the performance of the proposed algorithms for very large rasters?
If one of them is good with large images that's a cleaner choice without
all the workaround with scaling the rasters.

--
Best regards,
Chaitanya Kumar CH
On 15-Mar-2014 12:22 am, "Dmitriy Baryshnikov"  wrote:

>  Hi,
>
> I think we need to decide it here, not to create lot of proposals. The
> second idea is very interesting. Maybe it worth to create some common
> interface (or API) to add new methods BRISK, SURF, SIFT etc.
> You can develop you realisation of BRISK and demonstrate how-to one can
> use it via such common interface.
> E.g. in GDALComputeMatchingPoints add enum for algorithms or use exist
> papszOptions.
>
> Best regards,
> Dmitry
>
> 14.03.2014 17:28, Kshitij Kansal пишет:
>
> Hello everyone
>
>  Continuing the previous discussion, I would like to propose something
> and the community's suggestions are welcomed/needed. I can understand that
> this thread is a little old, so let me remind you that its regarding the
> automatic geo-referencer idea. The idea is also proposed on the GDAL ideas
> page (http://trac.osgeo.org/gdal/wiki/SummerOfCode).
>
>  Based on the previous discussions, what came out was that we can improve
> the current implementation of SIMPLE SURF in GDAL which was developed as a
> part of 2012 GSOC GDAL Correlator project, to support *large data* and *multi
> spectral imagery*. And then apply this *modified* algorithm for the
> geo-reference purposes. Now I have been in touch with Chaitanya, who is
> willing to mentor this project, and there are some things on which we would
> like to know community's suggestions/response.
>
>  There are basically two things that can be done regarding this project:
>
>  1. As mentioned above, we can modify the SIMPLE SURF algorithm and make
> it much better for the geo-reference purposes. Already, a lot had been
> discussed on this and we have a fairly good idea about what is to be done.
>
>  2. One more thing that can be done is that we can implement BRISK
> algorithm[1] instead of SURF along with the FLANN matcher for this purpose.
> What advantages this thing offers is that it is fairly fast and gives
> comparable outputs along with that it works well with fairly large data
> sets. So we do not need to segment the imagery as we would have done in the
> case of SURF. Also added to this, this algorithm also has no patent issues.
> We had a lot of problem regarding patent issues in SIFT/SURF and we
> discussed them at length on the mailing list as well.
>
>  One thing that I fell can be done is that  two proposal can be written,
> one for each and then community can decide accordingly which one is more
> useful. Or we can decide it here itself..?
>
>  Kindly provide your valuable comments and suggestion..
>
>  With Regards,
>
>  Kshitij Kansal
>
> Lab For Spatial Informatics,
>
> IIIT Hyderabad
>
>   1. http://www.robots.ox.ac.uk/~vgg/rg/papers/brisk.pdf
>
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] gdal_merge.py can not work

2014-03-09 Thread Chaitanya kumar CH
Ridge,

How did you install GDAL?
This usually happens when python cannot find the gdal libraries. Setting
PYTHONPATH env variable may help.


On Mon, Mar 10, 2014 at 10:17 AM, ridgewang  wrote:

> Hi,
>  I want to use gdal_merge.py to merge two image files. But it reports
> cannot load _gdal library and %1 is not a valid win32 module. Here the
> %1 means the _gdal, maybe.  In python CUI, I run 'import osgeo.gdal' or
> 'import gdal' command, it reports the same error information.
>  I use gdal 1.10.1 1400(vc2005) win32 version on win7 64bit OS, and
> the python version is 2.76.
> Any suggestions is appreciated.
>
> Ridge
>
>
>
> 发自我的 iPhone
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev




-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Missing features after copying layers from Shapefiles to SQLite

2014-03-03 Thread Chaitanya kumar CH
(sourceLayer),
> NULL);
> >>>
> >>> OGRLayerH destLayer = OGR_DS_GetLayerByName(destDS,
> >> OGR_L_GetName(sourceLayer));
> >>> printf("sourceFeatureCount:  %d\n", sourceFeatureCount);
> >>> printf("  destFeatureCount:  %d\n",
> OGR_L_GetFeatureCount(destLayer, YES));
> >>>
> >>> OUTPUT:
> >>>
> >>> sourceFeatureCount:  3882
> >>>   destFeatureCount:  1200
> >>>
> >>
> >> Hi,
> >>
> >> My guess is that CopyLayer is making 200 feature sized transactions and
> only
> >> 6 transactions are accepted by Spatialite which makes 1200 features. The
> >> rest transactions are not accepted for some reason. With Spatialite my
> guess
> >> is that it complains about constraints and some of the features do not
> share
> >> the same geometry type and SRID. Perhaps trying to write multipolygons
> into
> >> a layer that accepts only polygons or vice versa.
> >>
> >> -Jukka Rahkonen-
> >>
> >>
> >>
> >> ___
> >> gdal-dev mailing list
> >> gdal-dev@lists.osgeo.org
> >> http://lists.osgeo.org/mailman/listinfo/gdal-dev
> >
> > ___
> > gdal-dev mailing list
> > gdal-dev@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Help with color map for raster grid

2014-02-25 Thread Chaitanya kumar CH
Daniel,

You can build your own colour table using the api. In not familiar with the
C# interface but for C, you can refer to
http://gdal.org/classGDALColorTable.html

--
Best regards,
Chaitanya Kumar CH
On 25-Feb-2014 8:58 pm, "windchaser"  wrote:

> Chaitanya,
>
> Thanks for your prompt reply. I think I would like to use display engine,
> but I am still trying to figure out which function I need to use to 'load a
> different color table'. I am using GDAL with C# in a VS2010 project. Below
> is the function that opens the raster text file and returns the bitmap.
>
> when trying to retrieve the color table using this statement "ColorTable
> ct = band.GetRasterColorTable();" the color table returned is empty.
>
> From your post I understand that a VRT dataset needs to be created by
> copying the source dataset and then this VRT dataset can be manipulated to
> add more classes apply a color gradient to the classes.
>
> Are there any C# examples of using VRT dataset?
> Could you highlight the main steps that I need to take in order to achieve
> this?
>
> Thanks,
>
> public static Bitmap GetBitmap(string sFileName)
> {
> //**How to write manipulated raster values to ASCII grid with GDAL?
> //**
> http://stackoverflow.com/questions/10635107/how-to-write-manipulated-raster-values-to-ascii-grid-with-gdal
> OSGeo.GDAL.Dataset ds = Gdal.Open(sFileName,
> OSGeo.GDAL.Access.GA_ReadOnly);
> if (ds == null)
> {
> MessageBox.Show("Invalid File Format!");
> return null;
> }
>
> OSGeo.GDAL.Driver dr = ds.GetDriver();
>
> int nWidth = ds.RasterXSize;
> int nHeight = ds.RasterYSize;
>
> //** GDAL CSharp Guide gdal - Revision 26980:
> /trunk/gdal/swig/csharp/apps
> //** http://svn.osgeo.org/gdal/trunk/gdal/swig/csharp/apps/
>
> // Creating a Bitmap to store the GDAL image in
> Bitmap bitmap = new Bitmap(nWidth, nHeight,
> PixelFormat.Format8bppIndexed);
> // Obtaining the bitmap buffer
> BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0,
> nWidth, nHeight), ImageLockMode.ReadWrite, PixelFormat.Format8bppIndexed);
> try
> {
> int stride = bitmapData.Stride;
> IntPtr buf = bitmapData.Scan0;
> Band band = ds.GetRasterBand(1);
> band.ReadRaster(0, 0, nWidth, nHeight, buf, nWidth, nHeight,
> DataType.GDT_Byte, 1, stride);
> }
> finally
> {
> bitmap.UnlockBits(bitmapData);
> }
>
> return bitmap;
> }
>
>
>
> *Daniel*
> c: 1 (705) 499-2450
>
>
> On Tue, Feb 25, 2014 at 12:01 AM, chaitanya_ch [via OSGeo.org] <[hidden
> email] <http://user/SendEmail.jtp?type=node&node=5105844&i=0>> wrote:
>
>> Daniel,
>>
>> You can make changes in two places. In the data or the display engine. In
>> the data, you can modify the colour table. This will be permanent. In the
>> display, you just load a different color table based on the table of pixel
>> values. If you don't like either, you can build a gdal vrt file and modify
>> its colour table.
>>
>> http://www.gdal.org/gdalbuildvrt.html
>> http://www.gdal.org/gdal_vrttut.html
>>
>> --
>> Best regards,
>> Chaitanya Kumar CH
>> On 25-Feb-2014 9:26 am, "windchaser" <[hidden 
>> email]<http://user/SendEmail.jtp?type=node&node=5105703&i=0>>
>> wrote:
>>
>>> Hi,
>>> I am working with GDAL in a C# project. I need help figuring out how to
>>> increase the colors displayed on a raster grid. Opening the file using
>>> Gdal.Open("myfile", OSGeo.GDAL.Access.GA_ReadOnly); seems to offer some
>>> colors but I would like to increase the number of colors for the raster
>>> map,
>>> specially for floating point raster.
>>>
>>> Here is an example of what i am trying to achieve using GDAL.
>>>
>>> http://screencast.com/t/LPjJ7pTk <http://screencast.com/t/LPjJ7pTk>
>>>
>>> Thanks for your help!
>>>
>>> Daniel
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://osgeo-org.1560.x6.nabble.com/Help-with-color-map-for-raster-grid-tp5105698.html
>>> Sent from the GDAL - Dev mailing list archive at Nabble.com.
>>> ___
>>> gdal-dev mailing list
>>> [hidden email] <http://user/SendEmail.jtp?type=node&node=5105703&i=1>
>>>

Re: [gdal-dev] Help with color map for raster grid

2014-02-24 Thread Chaitanya kumar CH
Daniel,

You can make changes in two places. In the data or the display engine. In
the data, you can modify the colour table. This will be permanent. In the
display, you just load a different color table based on the table of pixel
values. If you don't like either, you can build a gdal vrt file and modify
its colour table.

http://www.gdal.org/gdalbuildvrt.html
http://www.gdal.org/gdal_vrttut.html

--
Best regards,
Chaitanya Kumar CH
On 25-Feb-2014 9:26 am, "windchaser"  wrote:

> Hi,
> I am working with GDAL in a C# project. I need help figuring out how to
> increase the colors displayed on a raster grid. Opening the file using
> Gdal.Open("myfile", OSGeo.GDAL.Access.GA_ReadOnly); seems to offer some
> colors but I would like to increase the number of colors for the raster
> map,
> specially for floating point raster.
>
> Here is an example of what i am trying to achieve using GDAL.
>
> http://screencast.com/t/LPjJ7pTk <http://screencast.com/t/LPjJ7pTk>
>
> Thanks for your help!
>
> Daniel
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/Help-with-color-map-for-raster-grid-tp5105698.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] How to exploit the spatial index (*.qix) file for spatial filtering?

2014-02-13 Thread Chaitanya kumar CH
Chuiqing,

You can create an index through SQL. This is the preferred method even if
you stick to the shapefile format for your vector data.

OGRDataSource::ExecuteSQL()

OGR's Shapefile driver supports these SQL commands among others:
CREATE SPATIAL INDEX ON layer_name [DEPTH n]
DROP SPATIAL INDEX ON layer_name
REPACK layer_name
RECOMPUTE EXTENT ON layer_name



On Fri, Feb 14, 2014 at 10:56 AM, C. Zeng  wrote:

> Hi Chaitanya,
>
> Thank you for your response,
> I know I can do this through GDAL binary, and my question is: how can I
> integrate this function into my code?
>
> I have a platform like QGIS, I would like the program itself have the
> ability to create and load .qix file. For example, when I open the .shp
> file, I can detect whether there is .qix, if not then create a new qix file;
> When the user zoom the map window, it will filter the map content via the
> qix file to accelerate the searching.
> Does GDAL/OGR has similar functions/classes, something like
> OGRSFDriverRegistrar::Createqix(savepath),
> OGRSFDriverRegistrar::Loadqix(path),to open and use qix files?
>
>
> Thank you,
>
> Chuiqing,
>
>
> On Thu, Feb 13, 2014 at 11:46 PM, Chaitanya kumar CH <
> chaitanya...@gmail.com> wrote:
>
>> Chuiqing,
>>
>> The OGR Shapefile driver supports spatial indexing through qix files. To
>> explicitly create a spatial index use the Create Index command:
>>
>> CREATE SPATIAL INDEX ON tablename [DEPTH N]
>>
>> Depth can range from 1 to 12. You can issue the SQL command using ogrinfo.
>>
>> ogrinfo -sql 'CREATE SPATIAL INDEX ON shapefilename [DEPTH N]' 
>> path/to/shapefile/directory
>>
>> http://www.gdal.org/ogr/drv_shapefile.html -> Spatial and Attribute Indexing.
>>
>>
>>
>> On Fri, Feb 14, 2014 at 3:12 AM,  wrote:
>>
>>> Hi chaitanya_ch,
>>> I know you are an expert on this, I want to know how can I use GDAL
>>> library to implemented qix reading and using in spatial filtering.
>>> I have many large shape files in Gigbyte level, they are very slow when
>>> navigating in my app. I want to use *.qix file through GDAL library to
>>> accelerate it.
>>>
>>> How can I do that?
>>> Thank  you,
>>>
>>> C. Zeng
>>>
>>>
>>> _
>>> Sent from http://osgeo-org.1560.x6.nabble.com
>>>
>>>
>>
>>
>> --
>> Best regards,
>> Chaitanya kumar CH.
>>
>> +91-9494447584
>> 17.2416N 80.1426E
>>
>
>


-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] How to exploit the spatial index (*.qix) file for spatial filtering?

2014-02-13 Thread Chaitanya kumar CH
Chuiqing,

The OGR Shapefile driver supports spatial indexing through qix files. To
explicitly create a spatial index use the Create Index command:

CREATE SPATIAL INDEX ON tablename [DEPTH N]

Depth can range from 1 to 12. You can issue the SQL command using ogrinfo.

ogrinfo -sql 'CREATE SPATIAL INDEX ON shapefilename [DEPTH N]'
path/to/shapefile/directory

http://www.gdal.org/ogr/drv_shapefile.html -> Spatial and Attribute Indexing.



On Fri, Feb 14, 2014 at 3:12 AM,  wrote:

> Hi chaitanya_ch,
> I know you are an expert on this, I want to know how can I use GDAL
> library to implemented qix reading and using in spatial filtering.
> I have many large shape files in Gigbyte level, they are very slow when
> navigating in my app. I want to use *.qix file through GDAL library to
> accelerate it.
>
> How can I do that?
> Thank  you,
>
> C. Zeng
>
>
> _
> Sent from http://osgeo-org.1560.x6.nabble.com
>
>


-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] [RFC] [GDAL] Idea for GSoC, 2014

2014-01-27 Thread Chaitanya kumar CH
Hi all,
I talked with Kshitij about this idea at length. I am sure that he can do a
good job. He has the programming skills and has academic background in
image processing and computer vision.

I am willing to co-mentor him.

Kshitij,
You did not include the extensions we discussed. Estimating the shift
between two georeferenced images, matching rasters with vector datasets.




On Mon, Jan 27, 2014 at 1:16 PM, Kshitij Kansal  wrote:

> Hello Everyone
>
> I am an undergrad student in my Junior year of study. I have been involved
> with some research in field of Spatial Temporal Analysis of Images. I have
> been using the GDAL for various purposes, for quite some time now. I
> thought that now its time to contribute something to Open Source Community.
> So I started to think about the GSoC, 2014. As I started browsing the last
> year's ideas, one idea that I could relate was "*Raster / Vector
> Geo-referencer on the Web*".
>
> *Motivation:*
> The main motivation behind this is that, among the very first things that
> are required in many remote sensing/geo-spatial related projects are
> geo-referenced images. Most of the images that we have are generally not
> referenced and hence we have to go to some tool and MANUALLY reference them
> with the help of some reference image. This generally takes a lot of time
> and most of the times errors do creep in.
>
> *Original Idea:*
> What has been proposed in this(as a part of GSoC'13 idea) was that we
> should provide two image, one reference image and other un-referenced
> image. Now with the help of this we should be able to geo-reference this
> unreferenced image by MANUALLY selecting the Control Points. Some thing
> like this :
> http://www.youtube.com/watch?feature=player_embedded&v=88gt1gj2dbs
>
> *Modified Idea:*
> Now what I felt was that, this idea can be made more innovative and useful
> if we can AUTOMATE this whole process of geo-referencing along with
> providing the option for manual selection. This is where the knowledge of
> Image Processing can help. There are various algorithms(like SIFT/SURF)
> which can be used for doing this. We can apply these algorithms and extract
> the GCP's and then geo-reference the images. Also, this thing has not been
> implemented in any of the other open source softwares(like GRASS,QGIS). So
> if we can implement this, other communities can build on these ideas or
> even adapt it. It would be "entirely based on GDAL and completely
> reusable"
>
> Furthermore, this idea can be expanded a lot in the sense that we should
> not not put restrictions to the number of bands in the images. Now what I
> mean by this is that reference image's bands may not be the same order of
> unreferenced. It should work with images of any number of bands.
>
> Any Comments or Suggestions or Feedback ?
> Anyone willing to help me in this?
>
> Regards,
>
> Kshitij Kansal
>
> Lab For Spatial Informatics,
>
> IIIT Hyderabad
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Question about gdaladdo and raster mosaicking

2014-01-21 Thread Chaitanya kumar CH
Ammar,

You are using lossy JPEG compression. I'm guessing that the white lines are
are actually pixels with values near but not equal to 255. So, they are not
treated as nodata pixels.

My suggestion is to use another format with lossless compression for the 21
images or use a mask band if you prefer.

Let me know how it goes.

--
Best regards,
Chaitanya Kumar CH
On 21-Jan-2014 5:31 pm,  wrote:

> Hello Chaitanya,
>
> I was looking online for solutions to my problem and I cam across some of
> your posts so I thought you might help me with my problem.
>
> I have 10,000+ TIFF files that I want to merge into one big Image and
> serve using GeoServer. I merged every 500 images at a time creating using
> gdalbuildvrt and gdal_translate along with JPEG compression creating 21
> TIFF files. I added overviews then to each of the new 21 files. When adding
> the images together, once directly as files using QGIS and another time as
> WMSs using GeoServer, I got white lines/gaps precisely at the border of
> ever 2 images. I thought the problem is with no data values but I decided
> to take another approach and merged all the 10,000 files into one huge
> image and this time I got one perfect image with no lines or gaps. I failed
> to create overviews for the big image because the process took days or
> gdaladdo running with no progress. I tested then on smaller images with and
> without overviews and the ones with no overview came perfect while the one
> with gdaladdo overviews came with the same problem of lines and gaps. The
> commands I m using are the following:
>
>  gdalbuildvrt -srcnodata 255 -vrtnodata 255 -a_srs EPSG:27700
> -input_file_list tiff_list.txt mosaic.vrt
>
> gdal_translate -of GTiff -co TILED=YES -co BIGTIFF=YES -co COMPRESS=JPEG
> -co JPEG_QUALITY=80 -co BLOCKXSIZE=512 -co BLOCKYSIZE=512 -co
> PHOTOMETRIC=YCBCR mosaic.vrt mosaic.tif
>
> gdaladdo mosaic.tif -r average --config COMPRESS_OVERVIEW JPEG --config
> JPEG_QUALITY_OVERVIEW 60 --config INTERLEAVE_OVERVIEW PIXEL --config
> PHOTOMETRIC_OVERVIEW YCBCR 2 4 8 16 32 64 128 256 512
>
> Any ideas, tips or recommendations would be appreciated!
>
> Best regards,
> Ammar
>
> _
> Sent from http://osgeo-org.1560.x6.nabble.com
>
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Unable to create MApInfo .tab File

2013-12-27 Thread Chaitanya kumar CH
av,

Can you check if ogr2ogr can convert the shapefile to mapinfo?

--
Best regards,
Chaitanya Kumar CH
On Dec 26, 2013 8:14 AM, "Avenger Maslog"  wrote:

> Hi Everyone!
>
> I'm having an issue with creating MapInfo .tab files. I'm trying to
> automate the process of creating either .tab or .shp files using the same
> set of codes. It works fine when the output specified are shapefiles but
> fails with a message: "Failed writing geometry for feature id #" for each
> .tab point feature that I was trying to create.The input is dictionary
> information and the output comes out as either .shp or .tab depending on
> which one was specified. I really hope somebody could point out the reason
> why it works with shapefiles but not with tab files. Thanks in advance!
>
> if fileType == "TAB":
> driver = ogr.GetDriverByName('MapInfo File')
>
> if fileType == "SHP":
> driver = ogr.GetDriverByName('ESRI Shapefile')
>
> featureDataSource = driver.CreateDataSource(fileName)
>
> layerName = "FeatureList"
> featureSpatialRef = osr.SpatialReference()
> featureSpatialRef.ImportFromEPSG(4326)
> featureLayer = featureDataSource.CreateLayer(layerName, srs =
> featureSpatialRef, geom_type=ogr.wkbPoint)
>
> standardFieldsList = []
>
> standardField = ""
>
> for attrib in attribList:
>
> if attrib["FLD_KEY"] == "ATTRIB_NAME":
> standardField = attrib["FLD_VAL"]
>
> if attrib["FLD_KEY"] == "DATA_TYPE":
> standardField = standardField + "." + attrib["FLD_VAL"]
>
> if attrib["FLD_KEY"] == "DATA_LEN":
> standardField = standardField + "." +
> str(attrib["FLD_VAL"])
>
> if attrib["FLD_KEY"] == "DEF_VAL":
> standardFieldsList.append(standardField)
> standardField = ""
>
> standardFieldsFileCreator = FileCreator()
> standardFieldsFileCreator.createStandardFields(standardFieldsList,
> featureLayer)
>
> featureObj = ogr.Feature(featureLayer.GetLayerDefn())
> featurePoint = ogr.Geometry(ogr.wkbPoint)
>
> for feature in featureList:
> for fieldName in feature.keys():
> fieldValue = feature[fieldName]
> featureObj.SetField(str(fieldName), str(fieldValue))
>
> coords = str(feature["COORDS"])
> coords = coords.strip()[1:-1]
> coords = coords.split(", ")
>
> featurePoint.AddPoint(float(coords[0]),float(coords[1]))
>
> featureObj.SetGeometry(featurePoint)
>
> featureLayer.CreateFeature(featureObj)
>
> featureDataSource.Destroy()
>
> av
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Hourly Consultant to help with python script

2013-12-18 Thread Chaitanya kumar CH
Hi Dennis,

I'd like to take up your offer. This looks like a small enough job. I can
use the gdal_polygonize algorithm to process all the areas with a value
other than nodata value.

Please email me the details and sample data if you would like me to work on
it.

--
Best regards,
Chaitanya Kumar CH
On Dec 18, 2013 9:07 PM, "Dennis Burgess"  wrote:

> I have a python script that I need to convert existing geotiffs to poly
> KML files.   The existing files are multi-colored, and all I want is any
> colored area, vs the background color.
>
>
>
> If you are interested, we can pay via paypal, send me your hourly rate and
> when you are free via e-mail!   We will remit payment once work is
> completed.
>
>
>
>
>
> *Dennis Burgess, *
>
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] gdal utilities question

2013-12-11 Thread Chaitanya kumar CH
Dennis,

You can create a new raster with the pixel values scaled to one bit so that
all you have is zero for no color and one for any color. Use gdal_translate
with the -scale option. The exact method depends on the data. Then you are
essentially ignoring the color.

Contours are set as lines instead of polygons because they terminate at the
raster edges.

--
Best regards,
Chaitanya Kumar CH
On Dec 11, 2013 9:48 PM, "Dennis Burgess"  wrote:

> I have been using the GDAL utilities.  But ran into a snag.  We create KML
> overlay files, basically KML file that geolocates a PNG on google maps.
> This PNG is a vector image as well as can have 1 or two colors other than
> the transparent background.We used gdal to convert this to a GEOTIFF
> using the gdal_contour and this work quite well, its ignores the colors for
> the most part, as all we want is a poly of the colored areas, don't care
> about what color.  gedal_polygonize, sees all colors and seams much more
> rough.
>
>
>
> in both cases, we generate a KML shapefile, but it appears they create
> line entries vs polygons.
>
>
>
> We also use ogr2ogr to simplify the KML as well.   Can anyone give me some
> better method to get a pologyon for only the colored areas , ignoring
> changes in color.?
>
>
>
> *Dennis Burgess,*
>
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Large shapefile issues

2013-11-25 Thread Chaitanya kumar CH
Darren,

These limitations are a result of the shapefile reader/writer
implementation. While the specification permits up to 8GB, the
implementation might not use it fully.

According to the specification a feature offset is stored as a 32-bit
integer to a 16-bit word. So, that's (2^32)*16 bits or (2^32)*2 bytes. To
fully utilize this, we need to use unsigned 32-bit integers and check for
overflows.
Originally, the shapelib library used by GDAL had the same limit as ESRI's.

If you are reaching the file size limits, I suggest you look into some
other file format to store your data. SQLite/SpatiaLite is a good option.

A hacky way to split the features across multiple shapefiles is to use the
-where option in ogr2ogr. You can filter based on the FID values.



On Mon, Nov 25, 2013 at 4:12 PM, CARMAN, Darren <
darren.car...@astrium.eads.net> wrote:

> Hi List
>
>
>
> I notice on the OGR formats page for ESRI Shapefile the following is
> mentioned:
>
> 
>
> Size Issues
>
> Geometry: The Shapefile format explicitly uses 32bit offsets and so cannot
> go over 8GB (it actually uses 32bit offsets to 16bit words). Hence, it is
> is not recommended to use a file size over 4GB.
>
> Attributes: The dbf format does not have any offsets in it, so it can be
> arbitrarily large.
>
> 
>
>
>
> Yet on the ESRI website:
>
> 
>
> Geometry limitations
>
> There is a 2 GB size limit for any shapefile component file, which
> translates to a maximum of roughly 70 million point features. The actual
> number of line or polygon features you can store in a shapefile depends on
> the number of vertices in each line or polygon (a vertex is equivalent to a
> point).
>
> 
>
>
>
> I assume the OGR web page is wrong, or has a different meaning outside of
> ESRI S/W use.
>
>
>
> I notice that the PostGIS utility pgsql2shp stops processing with an error
> once the dbf file goes over 2GB. Is there any way to get ogr2ogr to do this?
>
>
>
> Ideally, something I can’t find a lot of information about online, is
> there a way to get ogr2ogr to start writing to a new shapefile at a certain
> processing point (number of objects or file size)?
>
>
>
> Alternatively, assuming the OGR website text is correct for files it
> creates, is there any utility that could be used to split the created
> shapefile files into ones with a size less than 2GB?
>
>
>
> Thanks in advance
>
> Darren
>
>
>
>
>
>
>
> *Darren Carman*
> Senior Software Engineer
>
> GEO-Information Services
>
>
>
> *Astrium Services*
>
> Tel +44 (0)1252 362138
>
> http://www.astrium-geo.com <http://www.infoterra.co.uk>
>
>
>
>
>
> Infoterra Ltd. Is part of the Astrium GEO-Information Services Division
> and a wholly owned subsidiary of Astrium, Europe's leading space systems
> and services specialist.
>
> Disclaimer. The information contained in this e-mail and its attachments
> are confidential and intended only for the use of the named addressee(s).
> If you are not the intended addressee, please do not read, copy, use or
> disclose this message or its attachments. If you have received this message
> in error, please notify the sender immediately and delete or destroy all
> copies of this message and attachments in all media. Any views or opinions
> expressed are solely those of the author and do not necessarily represent
> those of Infoterra Ltd and shall not form part of any binding agreement.
>
> Infoterra Limited a company registered in England under number 2359955
> and having its registered office at Europa House, Southwood Crescent,
> Farnborough, GU14 0NL. VAT number GB 476 0468 27.
>
> P Before printing, think about the environment
>
>
>
>
>
>
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] ogr2ogr

2013-08-23 Thread Chaitanya kumar CH
Shalini,

You can use the -wrapdateline option in ogr2ogr to split the geometries
crossing the dateline meridian. You can fine-tune it with the
-datelineoffset option.




On Fri, Aug 23, 2013 at 12:46 PM, Shalini  wrote:

> Hi Chaitanya,
>
> Willyou please let me know:
>
> How do we correct geometry  which cross the meridian for a shp file using
> ogr command.
>
> Splitting the polygon using ogr command.
>
> Thanks in Advance,
> Shalini
>
>


-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Use GDAL to combine (rather than mosaic) rasters

2013-04-28 Thread Chaitanya kumar CH
Ritvik,

You can use gdal_calc.py to perform computations with multiple rasters. It
is not among the officially released scripts.
http://trac.osgeo.org/gdal/browser/branches/1.10/gdal/swig/python/scripts/gdal_calc.py
You can download the script from that page. The usage is described in the
comments.


On Mon, Apr 29, 2013 at 2:24 AM, Ritvik Sahajpal  wrote:

> Is there a GDAL command which can combine multiple rasters so that so a
> unique output value is assigned to each unique combination of input values,
> like the combine command in ArcGIS?
>
> gdal_merge seems to mosaic rasters so it is not exactly what I need.
>
> thanks!
>
> rit
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Polygonizer / Lines

2013-03-15 Thread Chaitanya kumar CH
Alisson,

Can you provide a sample dataset that didn't work?


On Fri, Mar 15, 2013 at 6:20 PM, Alisson Barbosa wrote:

> Thank you Chaitanya,
>
> I had read the explanation of Peter Halls. But that was *raster
> polygonization*. I am currently working with another type: *polygonization
> of OGRLineStrings*.
>
> My question was because i was not able to polygonize using the mentioned
> method. I created an OGRMultiLineString or an OGRGeometryCollection and
> added geometries (many OGRLineStrings) by addGeometry or
> addGeometryDirectly methods. But the polygonization always returned null.
>
> I solved using this:
>
> OGRMultiLineString *mls = new OGRMultiLineString();
> OGRMultiLineString* pTemp = NULL;
> while(...) //iteration of lines
> {
> //creation of line
> pTemp = static_cast(mls->Union(line));
> if (pTemp != NULL)
> {
> if( mls != NULL)
> {
> if( mls->getNumGeometries() > 0)
> delete mls;
>         }
> mls = pTemp;
> }
> }
>
> Thanks,
>
>
> 2013/3/14 Chaitanya kumar CH 
>
>> Alisson,
>>
>> You can refer to the method's documentation here:
>> http://www.gdal.org/ogr/classOGRGeometry.html#a674319670e735bf6d4049300096157ec
>>
>> The mechanism of this operation was already explained Peter Halls in this
>> mailing list[1]. GEOS does a good job identifying line strings touching at
>> end points and then combining them to make rings and then polygons.
>>
>> However, it's your job to ensure that all the line strings passed to the
>> method are part of a single polygon.
>>
>> [1]: http://lists.osgeo.org/pipermail/gdal-dev/2012-November/034793.html
>>
>>
>> On Thu, Mar 14, 2013 at 11:58 PM, Alisson Barbosa > > wrote:
>>
>>> Can you explain a bit better?
>>>
>>>
>>> 2013/3/14 Chaitanya kumar CH 
>>>
>>>> Allison,
>>>>
>>>> Check out OGRGeometry::Polygonize()
>>>>
>>>> The result depends on the type of intersections in your lines.
>>>>
>>>> --
>>>> Best regards,
>>>> Chaitanya Kumar CH
>>>> On 14 Mar 2013 21:53, "Alisson Barbosa"  wrote:
>>>>
>>>>> Hi friends,
>>>>>
>>>>> I have a set of OGRLineStrings and an OGRLinearRing with many
>>>>> intersections. I would like to polygonize this set of lines. Can anybody
>>>>> help me?
>>>>>
>>>>> Best regards,
>>>>> --
>>>>> Alisson Barbosa
>>>>> Systems Analyst - FUNCEME
>>>>> M.Sc. in Computer Science - MACC
>>>>> Graduate in Computer Science  - UECE
>>>>>
>>>>>
>>>>> ___
>>>>> gdal-dev mailing list
>>>>> gdal-dev@lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>>>
>>>>
>>>
>>>
>>> --
>>> Alisson Barbosa
>>> Systems Analyst - FUNCEME
>>> M.Sc. in Computer Science - MACC
>>> Graduate in Computer Science  - UECE
>>>
>>>
>>
>>
>> --
>> Best regards,
>> Chaitanya kumar CH.
>>
>> +91-9494447584
>> 17.2416N 80.1426E
>>
>
>
>
> --
> Alisson Barbosa
> Systems Analyst - FUNCEME
> M.Sc. in Computer Science - MACC
> Graduate in Computer Science  - UECE
>
>


-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Polygonizer / Lines

2013-03-14 Thread Chaitanya kumar CH
Alisson,

You can refer to the method's documentation here:
http://www.gdal.org/ogr/classOGRGeometry.html#a674319670e735bf6d4049300096157ec

The mechanism of this operation was already explained Peter Halls in this
mailing list[1]. GEOS does a good job identifying line strings touching at
end points and then combining them to make rings and then polygons.

However, it's your job to ensure that all the line strings passed to the
method are part of a single polygon.

[1]: http://lists.osgeo.org/pipermail/gdal-dev/2012-November/034793.html


On Thu, Mar 14, 2013 at 11:58 PM, Alisson Barbosa wrote:

> Can you explain a bit better?
>
>
> 2013/3/14 Chaitanya kumar CH 
>
>> Allison,
>>
>> Check out OGRGeometry::Polygonize()
>>
>> The result depends on the type of intersections in your lines.
>>
>> --
>> Best regards,
>> Chaitanya Kumar CH
>> On 14 Mar 2013 21:53, "Alisson Barbosa"  wrote:
>>
>>> Hi friends,
>>>
>>> I have a set of OGRLineStrings and an OGRLinearRing with many
>>> intersections. I would like to polygonize this set of lines. Can anybody
>>> help me?
>>>
>>> Best regards,
>>> --
>>> Alisson Barbosa
>>> Systems Analyst - FUNCEME
>>> M.Sc. in Computer Science - MACC
>>> Graduate in Computer Science  - UECE
>>>
>>>
>>> ___
>>> gdal-dev mailing list
>>> gdal-dev@lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>
>>
>
>
> --
> Alisson Barbosa
> Systems Analyst - FUNCEME
> M.Sc. in Computer Science - MACC
> Graduate in Computer Science  - UECE
>
>


-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Polygonizer / Lines

2013-03-14 Thread Chaitanya kumar CH
Allison,

Check out OGRGeometry::Polygonize()

The result depends on the type of intersections in your lines.

--
Best regards,
Chaitanya Kumar CH
On 14 Mar 2013 21:53, "Alisson Barbosa"  wrote:

> Hi friends,
>
> I have a set of OGRLineStrings and an OGRLinearRing with many
> intersections. I would like to polygonize this set of lines. Can anybody
> help me?
>
> Best regards,
> --
> Alisson Barbosa
> Systems Analyst - FUNCEME
> M.Sc. in Computer Science - MACC
> Graduate in Computer Science  - UECE
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Histograms without null pixels

2013-03-05 Thread Chaitanya kumar CH
The main usage of gdalinfo is manual inspection of the image. It was not
intended for use within other scripts. The output is formatted for human
reading.


On Tue, Mar 5, 2013 at 9:00 PM, Caleb Hanger  wrote:

> On Tue, Mar 05, 2013 at 01:31:01PM +0530, Chaitanya kumar CH wrote:
> > On Tue, Mar 5, 2013 at 11:53 AM, Caleb Hanger 
> wrote:
> > > What do you mean?  The histogram is only precomputed if gdalinfo has
> been
> > > run previously and stored a cache of data (the XML file) for later
> > > reference; please correct me if I'm wrong.  Otherwise, it seems to me
> that
> > > the data *must* be analyzed and the data computed; there is no way
> around
> > > that.  Additionally, I don't think it makes sense to say that it is
> faster
> > > to assemble a histogram that includes out-of-range values than to
> assemble
> > > a histogram that does not, because the latter is a subset contained
> within
> > > the former.
> > >
> > Some raster formats can store the histogram data as metadata. Also, there
> > are is a shortcut; overviews can be used to get approximate values
> faster.
>
> Understood, thanks for pointing that out.  In that case, however, the
> responsibility to decide whether to include out-of-range values lies in the
> raster format, correct?
>
> > You can write a simple python script to get the histogram. You can get a
> > good idea at
> >
> http://trac.osgeo.org/gdal/browser/trunk/autotest/gcore/histogram.py#L103
>
> Right, of course I can construct my own utility to include the GDAL
> libraries and call GetHistogram in the manner I'd like, and I will probably
> end up doing so, but in C.  My main goal at the moment is a bash shell
> script that accomplishes a bigger task, so with a Python script I'd still
> have to call out to the Python script externally.  Either language would be
> suited well for the smaller purpose of getting and analyzing the histogram.
>  I merely found it odd that gdalinfo does not allow the user to disable an
> option that just doesn't seem to make sense for most applications.
>
> > > Yes: quite simply, a histogram that does not include illegitimate
> values
> > > makes more sense than a histogram that does include them.  At least,
> this
> > > is the case in my experience; perhaps there are situations I'm
> unfamiliar
> > > with in which the histogram is desired to include values outside of the
> > > histogram's range, for some reason.  I'd even go so far as to say that
> > > gdalinfo currently *lies* about the histogram, telling the user that
> the
> > > histogram shows "256 buckets from X to Y" even though the histogram
> > > includes values which are *outside of that range*.
> > >
> > > Arguably an even better justification is that the machinery to exclude
> the
> > > illegitimate values is already present in GetHistogram, so *very* few
> lines
> > > of code would need to be added to gdalinfo, simply to provide a flag
> for
> > > the user and if that flag is specified, pass "false" for the right
> > > parameter to GetHistogram (bIncludeOutOfRange), instead of just calling
> > > GetDefaultHistogram.
> > >
> >
> > That sounds reasonable. If you can, you should submit a patch or a
> request
> > at http://trac.osgeo.org/gdal/newticket
> > Note that the functionality should include the facility to include
> options
> > to mention the min/max values.
>
> Thanks; I will post a patch when I have a chance.  When requesting a
> histogram in gdalinfo, the min/max values are already mentioned, and this
> will just be an addition to, and modification of, that functionality.
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Histograms without null pixels

2013-03-05 Thread Chaitanya kumar CH
Caleb,


On Tue, Mar 5, 2013 at 11:53 AM, Caleb Hanger  wrote:

> On Tue, Mar 05, 2013 at 11:19:27AM +0530, Chaitanya kumar CH wrote:
>
> > Caleb,
> >
> > gdalinfo uses the GetDefaultHistogram() method which can do this faster
> by
> > fetching a precomputed histogram.
>
> What do you mean?  The histogram is only precomputed if gdalinfo has been
> run previously and stored a cache of data (the XML file) for later
> reference; please correct me if I'm wrong.  Otherwise, it seems to me that
> the data *must* be analyzed and the data computed; there is no way around
> that.  Additionally, I don't think it makes sense to say that it is faster
> to assemble a histogram that includes out-of-range values than to assemble
> a histogram that does not, because the latter is a subset contained within
> the former.
>
Some raster formats can store the histogram data as metadata. Also, there
are is a shortcut; overviews can be used to get approximate values faster.


>
> gdalinfo is a command line program. Even a default histogram of 256
> buckets
> > is hard to visualize in text mode. A much better way is to use a desktop
> > GIS like qgis to view the histogram.
>
> A desktop GIS is not practical for providing a shell script meant to
> automate a repetitive (and much larger) task, with a small chunk of data
> that it needs for a single step in the process.  That is, I don't need to
> "visualize" the data -- I just need to get the information.  The more
> primitive the format, the better, as I like things that are lean and mean,
> and I know how to instruct the script to do the required mathematics upon
> the text-only histogram.
>
You can write a simple python script to get the histogram. You can get a
good idea at
http://trac.osgeo.org/gdal/browser/trunk/autotest/gcore/histogram.py#L103


>
> > Can you justify adding this extra functionality in gdalinfo?
>
> Yes: quite simply, a histogram that does not include illegitimate values
> makes more sense than a histogram that does include them.  At least, this
> is the case in my experience; perhaps there are situations I'm unfamiliar
> with in which the histogram is desired to include values outside of the
> histogram's range, for some reason.  I'd even go so far as to say that
> gdalinfo currently *lies* about the histogram, telling the user that the
> histogram shows "256 buckets from X to Y" even though the histogram
> includes values which are *outside of that range*.
>
> Arguably an even better justification is that the machinery to exclude the
> illegitimate values is already present in GetHistogram, so *very* few lines
> of code would need to be added to gdalinfo, simply to provide a flag for
> the user and if that flag is specified, pass "false" for the right
> parameter to GetHistogram (bIncludeOutOfRange), instead of just calling
> GetDefaultHistogram.
>

That sounds reasonable. If you can, you should submit a patch or a request
at http://trac.osgeo.org/gdal/newticket
Note that the functionality should include the facility to include options
to mention the min/max values.


> > On Tue, Mar 5, 2013 at 10:56 AM, Caleb Hanger 
> wrote:
> >
> > > All,
> > >
> > > I am writing a script which is calling gdalinfo to get a histogram of
> > > pixel values in an image file.  Apparently the mechanism for obtaining
> a
> > > "default" histogram enables the "bIncludeOutOfRange" flag to dump
> > > not-in-range pixels (including null pixels, in formats that support it)
> > > into whichever bin of the histogram is closest.  I see that in the
> > > GetHistogram() function, the functionality is already coded to respond
> > > appropriately to either a true *or* false value in this flag.
>  However, I
> > > can't seem to find any way to turn that flag off through any of the
> > > user-level programs (in particular, gdalinfo), rendering the parameter
> to
> > > the function useless, unless I'm just not looking hard enough.  Hence,
> my
> > > questions:
> > >
> > > 1) Is there any standard user-level operation (preferably in gdalinfo)
> > > which disables, or at least *allows* for disabling of, the
> > > bIncludeOutOfRange flag?  If so, I can't find it.
> > > 2) If not, how come?  Has there been no apparent need for histograms
> that
> > > omit null values or other "out of range" situations?
> > >
> > > Thanks in advance for any insight,
> > > Caleb Hanger
> > > ___
> > > gdal-dev mailing list
> > > gdal-dev@lists.

Re: [gdal-dev] Histograms without null pixels

2013-03-04 Thread Chaitanya kumar CH
Caleb,

gdalinfo uses the GetDefaultHistogram() method which can do this faster by
fetching a precomputed histogram.
gdalinfo is a command line program. Even a default histogram of 256 buckets
is hard to visualize in text mode. A much better way is to use a desktop
GIS like qgis to view the histogram.

Can you justify adding this extra functionality in gdalinfo?



On Tue, Mar 5, 2013 at 10:56 AM, Caleb Hanger  wrote:

> All,
>
> I am writing a script which is calling gdalinfo to get a histogram of
> pixel values in an image file.  Apparently the mechanism for obtaining a
> "default" histogram enables the "bIncludeOutOfRange" flag to dump
> not-in-range pixels (including null pixels, in formats that support it)
> into whichever bin of the histogram is closest.  I see that in the
> GetHistogram() function, the functionality is already coded to respond
> appropriately to either a true *or* false value in this flag.  However, I
> can't seem to find any way to turn that flag off through any of the
> user-level programs (in particular, gdalinfo), rendering the parameter to
> the function useless, unless I'm just not looking hard enough.  Hence, my
> questions:
>
> 1) Is there any standard user-level operation (preferably in gdalinfo)
> which disables, or at least *allows* for disabling of, the
> bIncludeOutOfRange flag?  If so, I can't find it.
> 2) If not, how come?  Has there been no apparent need for histograms that
> omit null values or other "out of range" situations?
>
> Thanks in advance for any insight,
> Caleb Hanger
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Creation/read format question

2013-03-04 Thread Chaitanya kumar CH
Hi Tyler,

'ro' and 'rw' mean what they imply.

The '+' symbol tells that the format supports the Create() method. So, we
can use them to create a dataset from scratch and add metadata explicitly.
Without it, we need a 'template' dataset.

The 'v' means that the format driver supports the virtual system interface.
Note that there may be drivers that support it but don't report that they
do.


On Tue, Mar 5, 2013 at 9:01 AM, Tyler Mitchell wrote:

> Not sure how to describe it, but when gdal lists available formats, I see
> a few different ways that formats are marked as read, write, etc.
> The "rw" and "ro" items are easy enough for me to understand, but what
> about:
> "rov"
> "rw+v"
> "rwv"
> "rw+"
> ?
>
> Does the "v" refer to support in VRTs perhaps?
> Do  rw+v, rwv, rw+ all mean same thing?
>
> Any tips appreciated :)
>
> Tyler
> _______
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] ogr2ogr with append fails to convert truncated fields

2013-03-01 Thread Chaitanya kumar CH
A simple temporary fix is to use the -sql option and use the AS keyword to
set the alias of the original field name into the truncated name.


On Sat, Mar 2, 2013 at 1:27 AM, Tamas Szekeres  wrote:

>
>
> 2013/3/1 Even Rouault 
>
>>
>> There's even a 4th option that doesn't require any code change. Create a
>> OGR
>> VRT file that renames the source fields to the truncated shapefile field
>> names (or
>> the reverse : creates a OGR VRT that renames the truncated shapefile
>> field names
>> to the original field names, since OGR VRT now supports since a few
>> versions
>> CreateFeature())
>>
>
>
> This may probably work, but doesn't seem to be very user friendly.
> Actually I would prefer to include at least a flag to indicate that ogr2ogr
> should provide mapping the fields in the same order (don't lookup field
> index by name) for example:
>
> ogr2ogr -append -f "ESRI Shapefile" -nofieldreorder destination.shp
>  [source]
>
> or with the previous fieldmap approach
>
> ogr2ogr -append -f "ESRI Shapefile" -fieldmap "default" destination.shp
>  [source]
>
> Best regards,
>
> Tamas
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Closing disconnected contours

2013-02-25 Thread Chaitanya kumar CH
zeta,

gdal_fillnodata is intended for raster images, like a DEM. Your image is a
rendered map.
The image you provided is not suitable for unsupervised processing,
especially with GDAL.


On Tue, Feb 26, 2013 at 12:53 PM, zeta  wrote:

> Chaitanya kumar CH wrote:
> >
> >Are the lines in topo.tif contour lines? How did you generate them?
>
>
> Hi Chaitanya,
>
> I segmented scanned image, and then did thinning on separation that
> interested me - that is topo contours. Here is link to a part of scanned
> image that I used as example: http://i.imgur.com/Wyv147m.png
>
> I thought also that maybe gdal_fillnodata.py doesn't like thinning (1px
> contours) and I did dilation on same image to get topo contours with 3px
> width, but result was worse.
> Did I expected too much, or maybe my image wasn't prepared corectly for
> gdal algorithm used in gdal_fillnodata.py?
>
>


-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Closing disconnected contours

2013-02-25 Thread Chaitanya kumar CH
zeta,

Are the lines in topo.tif contour lines? How did you generate them?


On Tue, Feb 26, 2013 at 12:20 AM, zeta  wrote:

> Chaitanya kumar CH wrote:
> >
> >zeta,
> >
> >The gaps are likely caused by pixels with no data. A simple method is to
> >run gdal_fillnodata.py on the original raster and then create the
> contours.
> >
> >http://www.gdal.org/gdal_fillnodata.html
>
> Thanks Chaitanya,
>
> that's excellent news, as I previously searched for algorithms about curve
> reconstruction, and none seemed easy for implementation. I was driven by
> approach using Delaunay Triangulation,  referenced to Amenta "The crust and
> the beta -skeleton: Combinatorial curve reconstruction" and plastically
>  explained i.e. here:
> http://valis.cs.uiuc.edu/~sariel/research/CG/applets/Crust/Crust.html but
> I thought to look for shortcut if possible, without reinventing
> implementation.
>
> I tried the script, and I get some gaps filled, but most aren't. I used
> -md parameter of 20px, but changed that value from 10 to 300 without
> significant improvement. Then I used mask file, which I assume works as in
> OpenCV Inpaint function, by using mask as a helper for gap detection, but
> without success.
>
> I'm attaching example image, and mask image, which I used to test the
> script, in a hope that someone can tell me if better results are possible.
>
> Thanks




-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] ogr2ogr with append fails to convert truncated fields

2013-02-25 Thread Chaitanya kumar CH
Can we expect the fields to remain in the same order every time?
Hi All,

Related to issue #3247  we
experienced, that if we use ogr2ogr to append source data to a shapefile
destination (by using the -append flag) and field name truncation is taking
place, the corresponding values are not copied.

This is because when setting up the field index map (in ogr2ogr) the
destination (truncated) field indexes are searched by the name of of the
source fields (the long names).

Since it's not always trivial to find the correct fields by names, how
about exposing the field map itself as an option, something like:

ogr2ogr -append -f "ESRI Shapefile" -fieldmap "0,1,2,3,4,5" destination.shp
 [source]


Would that workaround be sufficient?


Best regards,

Tamas


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Closing disconnected contours

2013-02-25 Thread Chaitanya kumar CH
zeta,

The gaps are likely caused by pixels with no data. A simple method is to
run gdal_fillnodata.py on the original raster and then create the contours.

http://www.gdal.org/gdal_fillnodata.html



On Mon, Feb 25, 2013 at 1:01 PM, zeta  wrote:

> Hi,
>
> I have shape file from sample map, consisting of topological contours.
> However many contours have small gaps and I'm looking for a pointer how to
> connect those lines, automatically.
> Does ogr have a method or maybe more generally does anyone know of a tool,
> that would correctly close disconnected contours, which aren't labeled?
> Gaps are small - artifacts from graticules present in original image used
> as source for creating this vector.
>
> Thanks
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] To know about centriod of a polygon shape file

2013-02-20 Thread Chaitanya kumar CH
Siva,

If you want to remove features with duplicate centroids, it is not safe to
use the spatial filter directly. A centroid may lie outside the geometry.

Make a duplicate layer using OGRDataSource::CopyLayer() and replace the
geometry in each feature with its centroid. So, the duplicate layer will
have all the corresponding centroids. Now you can loop through each feature
in the original layer and then get coinciding points by applying a spatial
filter on the duplicate layer.

Let us know how it went.


On Wed, Feb 20, 2013 at 12:04 PM, SIVA RAMA KRISHNA
wrote:

>  Chaitanya,
>   Fine i got your point .I wanted to know when do different  features have
> same centroids for  removing duplicate centriods
>
>With Regards
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] To know about centriod of a polygon shape file

2013-02-19 Thread Chaitanya kumar CH
Siva,

Centroid of a polygon need not coincide with the centroid of it's buffer.


On Tue, Feb 19, 2013 at 11:21 AM, SIVA RAMA KRISHNA
wrote:

> Dear All,
>
> I am just working on  Shape files I am unable to detect duplicate
> centroids in a shape file
>
> .After buffering a polygon does centroids of both will match
>
>
>
> Any help in greatly  appreciated
>
>
> With Regards
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Creating Raster using Spatial Coordinates (Latitude and Longitude)

2013-01-17 Thread Chaitanya kumar CH
Dheeraj,

OGR's CSV driver[1] can read your vector data.
You have to decide how to represent your data in a raster. Interpolate
missing areas, set nodata pixels or something else.

Have a look at the gdal_rasterize utility[2].

[1]: http://www.gdal.org/ogr/drv_csv.html
[2]: http://www.gdal.org/gdal_rasterize.html


On Thu, Jan 17, 2013 at 5:56 AM, Dheeraj Reddy Mamidi <
drmam...@rothwellgroup.com> wrote:

> I am using C# Gdal library.
>
>
> On Wed, Jan 16, 2013 at 5:25 PM, Dheeraj Reddy Mamidi <
> drmam...@rothwellgroup.com> wrote:
>
>> Hi,
>>
>> I am trying to create a Raster using grid of points(with latitude and
>> longitude values) within an area which are separated at a distance measured
>> in degrees. At higher latitudes the number of samples reduce that is number
>> of points for a row reduces.
>>
>> When distance between points is determined with a fixed degree, how do I
>> create a raster where the number of columns for higher latitudes reduces ?
>> In this case, points for grid at higher latitudes are not exactly above the
>> points at lower latitudes. Can some one suggest a way to create raster for
>> spatial coordinates in this case?
>>
>> Thanks,
>> Dheeraj
>>
>>
>>
>
>
> --
> Dheeraj Reddy Mamidi
>
> Software Developer
> The Rothwell Group, L.P.
> Email: drmam...@rothwellgroup.com 
> Phone: 713-952-5355 ext.30
> Web: www.rothwellgroup.com
>
> ___________
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] Fwd: Removing Dangle lines in shape files

2013-01-17 Thread Chaitanya kumar CH
Siva,

I haven't gone through your code. It seemed incomplete and under
development. While I would like to help you with using the GDAL library, I
can't spare the time to go through this. I suggest posting your problem in
a linkedin group or something else. Also, as a fellow developer, I
recommend not asking others to read your uncommented code. You did not try
to explain your code's logic.

I am not completely sure what you mean my dangling lines, but I suspect you
mean lines or parts of lines intersected by other lines. If that is the
case, I suggest creating a new dataset as you process individual features.
It will help with the problem of duplicate features. If you have to split
only one of the intersecting lines, you can compare a feature only with the
subsequent or antecedent features.


On Thu, Jan 17, 2013 at 10:40 AM, SIVA RAMA KRISHNA
wrote:

> Chaitanya,
>
> For Dangling, their are no errors but i am not sure whether the code is
> doing actual process of Dangling  i am considering as only one of the
> feature is basis for checking with the other lines when i carry this logic
> for remaining features it may result to duplicates
>
> so I need to know whether this approach is correct,
>
> could you tell me to figure out for angles between lines at nodes
>
>
>
> with Regards
>
>
>


-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Removing Dangle lines in shape files

2013-01-16 Thread Chaitanya kumar CH
Siva,
Is your code working? If not, what were the errors?


On Wed, Jan 16, 2013 at 1:17 PM, SIVA RAMA KRISHNA
wrote:

> Dear All,
>
> I am Trying to remove Dangle Lines from a shape file containing
> OGRLineString (polyline).I am thinking that if a line(2),line(3),line(4)
> crosses a another line(1) detecting  the point of intersection and
> removing  the part beyond line1 . I am employing following code and
> attaching it.
>
>
> Any suggestion is highly  appreciated
>
> with Regards
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Creating new column with filename, scripting shapefiles

2012-11-29 Thread Chaitanya kumar CH
Joe,

What was the full warning message about the normalized/laundered field
name? Field name is modified when the name is longer than 10 characters or
when a field with same name exists.
Check the name of the newly created field.

As per the update command, I don't think the update command is implemented
in the ogr sql yet. You can do it in the sqlite format, among other rdbms
formats. Use ogr2ogr to convert it to sqlite. update it. convert it back to
shapefile.


On Thu, Nov 29, 2012 at 8:58 PM, Joe Larson  wrote:

> I have tried these three methods to add a filename column while scripting
> a folder of shapefiles, with a Bash script - which results in `Warning 6:
> Normalized/laundered field name` & `ERROR 1: SQL Expression Parsing Error:
> syntax error` messages and NULL values in the created column :
>
> #1
>
> for f in *.shp;
>
> do
>
> name=${f%.shp}
>
> ogrinfo $f -sql "ALTER TABLE $name ADD COLUMN filename character(10)"
> ogrinfo $f -sql "UPDATE TABLE $name filename = '$f'"
> done;
>
> #2
>
> for f in *.shp;
>
> do
>
> name=`echo "$f"|sed 's/\.shp$//g'`
>
> ogrinfo $f -sql "ALTER TABLE $name ADD COLUMN filename character(10)"
> ogrinfo $f -sql "UPDATE TABLE $name filename = '$f'"
> done;
>
> #3
>
> for f in *.shp;
>
> do
>
> name=`basename $f .shp`
>
> ogrinfo $f -sql "ALTER TABLE $name ADD COLUMN filename character(10)"
> ogrinfo $f -sql "UPDATE TABLE $name filename = '$f'"
> done;
>
>
> There's an example here http://trac.osgeo.org/gdal/wiki/FAQVector called
> "How do I include the source filename in a field when merging hundreds of
> shapefiles (Windows)?" I also cannot get this to work - getting
> "unrecognized fieldname" message.
>
> Perhaps my variable does not work in the Bash SQL statement. I'm not sure
> what's going on in the Windows example.
>
> Regards,
> Joe Larson
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] LiDAR data formats

2012-11-19 Thread Chaitanya kumar CH
Hi,

Can someone tell me the most common data formats useful for storing the
LiDAR data including the LiDAR specific data.

-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] .tab to .mif with ogr2ogr

2012-11-01 Thread Chaitanya kumar CH
Wael,

Can you give more details like the version of GDAL you are using and an
output of ogrinfo of the source?
(Use "ogr2ogr --version")

On Thu, Nov 1, 2012 at 4:04 PM, Wael Tarhouni  wrote:

> Hi All;
>
> I'm tryin to convert a .tab file(Mapinfo) to a .mif file using the
> following command :
>
> ogr2ogr -f "MapInfo File" dst_datasource -dsco FORMAT=MIF src_datasource
>
> but FWtools crashes !!
>
> is there any problem with this command line ?
>
> Best regards
>
> --
> Wael Tarhouni
> Élève ingénieur en Réseaux informatiques et Télecommunication à l'INSAT
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] to detect a point in ageometry

2012-10-31 Thread Chaitanya kumar CH
Siva,

In shapefile format, deleted features are just 'marked' as deleted instead
of actually removing them. This makes it faster. However, the statistics
may not be updated. Specifying the the bForce parameter with the
GetFeatureCount() method may be useful.
To actually remove the features, you have to create a new shapefile layer
object and save it.

BTW, you should use GetFeatureCountI() instead of GetFieldCount().

On Wed, Oct 31, 2012 at 4:01 PM, SIVA RAMA KRISHNA
wrote:

> hai chaitanya,
>
> I have fixed it by using point.within(geometry)
> But I am having a problem  with  deleting a
> feature
> After deleting a feature succesfully from a shape
> file
> Next time when i load it is all features  count
> but displying correctly with the undelaeted features
>
>   void myWindow::selectingFeature(QMouseEvent* event)
>
>   {
> poLayer->ResetReading();
>while( (poFeature = poLayer->GetNextFeature()) != NULL )
>{
> poGeometry = poFeature->GetGeometryRef();
>  if(poGeometry !=NULL
>   &&
> wkbFlatten(poGeometry->getGeometryType()) == wkbPolygon)
> {
>
> if( p2.Within(poGeometry))
> {
>polyShape  = (OGRPolygon*)
> poGeometry;
>qDebug()<<"Feature Selected";
>qDebug()<GetFID();
>path.addPolygon(polygon);
>featureid=poFeature->GetFID();
>  }
>
>
>}
>
>}
>
> }
>
>
>
> // this is a slot after deleting  a feature
> void myWindow::DeletingFeature()
> {
>
>  qDebug()<<" deleting feature";
>
>  poLayer->ResetReading();
>  while( (poFeature = poLayer->GetNextFeature()) != NULL )
>  {
>   poLayer->DeleteFeature(featureid);
>   qDebug()<<"deleted"<GetFieldCount();
>   qDebug()<GetFID();
>   }
>
> }
>
> No of features 3
>
> Feature Selected
>
> 1
>
> not
>
> deleting feature
>
> deleted 1
>
> 1
>
> ERROR 1: Attempt to delete shape with feature id (1), but it is marked
> deleted already.
>
> deleted 1
>
> 2
>
> with Regards
>
>


-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] problem in removing feature

2012-10-29 Thread Chaitanya kumar CH
Siva,

Make sure you open the data source with the bUpdate option set to TRUE in
OGROpen().

On Mon, Oct 29, 2012 at 4:14 PM, SIVA RAMA KRISHNA
wrote:

> hai chaitanya,
>
>
>I have a single layer shape file with many features
>
>   I want to remove   a feature by the following way
>
>
>
> while( (poFeature = poLayer->GetNextFeature()) != NULL )
>  {
>   poLayer->DeleteFeature(poFeature->GetFID());
>
>   qDebug()<GetFieldCount();
>   qDebug()<GetFID();
>   }
>
> i am getting a error for all shape files which are not read only
>
> ERROR 1: The DeleteFeature() operation is not permitted on a read-only
> shapefile.
>
>
> any help would be great for me
>
> With Regards
>
>


-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] breaking lines at intersection

2012-10-28 Thread Chaitanya kumar CH
Siva,

There is currently no direct function to break lines at intersections. In
any case, it is a simple operation with complex options. What attributes
should the new pieces get? Should we save it to a new layer or append to
the current layer? Should we modify the original feature to retain one of
the pieces? When two lines intersect, which one of them should be split?...
So, please write your own procedure and do share your experience.

On Sun, Oct 28, 2012 at 4:21 PM, SIVA RAMA KRISHNA
wrote:

> hai,
>
>
>  would you tell whether i can do Breaking lines at intersection in
> vector files using gdal
>
>
>
>any help will be greatly appreciated
>
>
> with Regards
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Convert kml to Shapefile and conserve polygon's colors with Ogr2Ogr

2012-10-22 Thread Chaitanya kumar CH
Wael,

There is no support for style information in shapefile format. However, you
can store the style info as a regular attribute value. Using OGR's SQL you
can extract the style string from the kml data and then store it in the
shapefile. Please go through the OGR SQL page[1]. You can get the style
from the special field named "OGR_STYLE".

[1]: http://www.gdal.org/ogr/ogr_sql.html

On Mon, Oct 22, 2012 at 2:25 PM, Wael Tarhouni  wrote:

> Hi All,
>
> I'm using Ogr2Ogr to convert kml file to shapefile but the color of the
> shape output file is unique, i 'm always loosing the colors of my polygons
>  in the shapefile...
>
> is there any way to solve this problem ?
>
> Best regards;
>
> --
> Wael Tarhouni
> Élève ingénieur en Réseaux informatiques et Télecommunication à l'INSAT
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] dotspatial map control navigation

2012-10-19 Thread Chaitanya kumar CH
Nikhil,

You should ask the dotspatial community on how to perform the pan/zoom
operations.

To select a feature with a particular RCID, you can set an attribute filter
on that particular layer and request the next feature. Since the RCID value
is unique, you will get the only feature. You have to read the geometry in
that feature and then zoom/pan to that location.

On Fri, Oct 19, 2012 at 3:20 PM, Nikhil Sai Parupalli <
nikhil.parupa...@iictechnologies.com> wrote:

>  Hi
>
>  I am developing an application which has dotspatial map control do
> display S57 dataset.
> Here it is displaying fine but I have to write a code where user should be
> navigated to particular coordinates when clicking and RCID(it has
> coordinate information).
> If you have worked on similar type of thing do share me some idea.
>
>
>
>  Thanks and Regards
> Nikhil Sai Parupalli
>
>
>
> Note: Do not print this email until and unless it is really required.
> Save paper , stay Green
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Georeferencing problem

2012-10-19 Thread Chaitanya kumar CH
Nitasha,

I see that all the GCPs have the same value '70.2958709253187'. Correct
your GCPs and try again.

On Fri, Oct 19, 2012 at 1:04 PM,  wrote:

> Hello Sir ,
> I am new to GIS and I am trying to georeference a image( 15min X 15min
> multispectral image) using gdal.The process that I am following is as
> follows :
>
> 1. First i am using gdal-translate with -gcp & -a-srs epsg ;
>
> gdal_translate -gcp 750.473430004334 3070.53287635397 70.2958709253187
> 27.9375281361964 -gcp 4057.56191915846 4036.62967261977 70.2958709253187
> 27.9964718881037 -gcp 3695.42969944292 1084.49720804115 70.2958709253187
> 27.8162786236328 -gcp 18.5158756347083 88.546174354395 70.2958709253187
> 27.7554467555991 -gcp 2114.46778195322 2068.47766007366 70.2958709253187
> 27.8762596874124 -a_srs epsg:4326 "InputImg.tif" "OutputImg.tif"
>
> 2. Then I am using gdalwarp  with -r option :
>
> gdalwarp -r Bilinear "outputImg.tif" "GeorefImg.tif"
>
>
> But I am getting an error "failed to compute gcp transform transform is
> not solvable"
>
> Also, please tell me if I am using correct method to georeference a image.
> Please help me, I am badly struck with this problem from many days.
>
>
> Thanks
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Topological pointer

2012-10-05 Thread Chaitanya kumar CH
Nikhil,

Can you explain what you mean by topology indicator?

On Fri, Oct 5, 2012 at 11:36 PM, Nikhil Sai Parupalli <
nikhil.parupa...@iictechnologies.com> wrote:

>  Hi All,
>
>  We are working on project which renders S57 dataset , I used GDAL for
> rendering GIS data and DOTSPATIAL for displaying map.
> Here I could read dataset , but can any one know how do we get Topological
> Indicator value
>
>
>
>  Thanks and Regards
> Nikhil Sai Parupalli
>
>
>
> Note: Do not print this email until and unless it is really required.
> Save paper , stay Green
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] geotiff

2012-09-27 Thread Chaitanya kumar CH
Neelima,

Please refer to the DotSpatial docs at
http://dotspatial.codeplex.com/documentation

On Thu, Sep 27, 2012 at 5:26 PM, Neelima Emmani <
neelima.emm...@iictechnologies.com> wrote:

>  Hi
>
> Can anyone tell me how to display geotiff image in a dotspatial map using
> c#.
>
> With Regards,
> Neelima Emmani
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] GDAL at FOSS4G-India

2012-09-26 Thread Chaitanya kumar CH
Hi all,

I am conducting a workshop[1] on GDAL at the first FOSS4G conference of
India. I even got some requests from some developers in India for more GDAL
stuff.

I am also preparing a paper on GDAL. It will include everything. It's
inspiration, history, usability, features, design and future work. It will
also include deciding factors for design choices if anyone co-authors it.
Obviously I am going to borrow most of the content from the gdal wiki and
this mailing list. Please tell me if I am missing anything.

In the last few years I found myself helping developers with the smaller
issues when they are starting to use the library. More often than not,
first step is the hardest. I hope to achieve the same goal on a bigger
scale with Indian developers. India is in need for more open source. I
would like to help it.

[1]: http://lsi.iiit.ac.in/foss4gindia/?q=hands-workshop#WH4

-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] how to create an image with a colortable?

2012-09-26 Thread Chaitanya kumar CH
Sam,

datatype is handled by gdal. Can you provide the gdalinfo output of the
GeoTiff?

On Wed, Sep 26, 2012 at 4:28 PM, Samantha Goodchild-Brown <
samant...@geograph.co.za> wrote:

>  After using gdal info to confirm my input image is a greyscale, using the
> FAQRaster intructions I used gdal_translate to create a VRT.
> I then opened it in crimson editor to edit the colorinterp and add in the
> colortable. I used
>
> Palette
> 
><11 c1="181" c2="69"  c3="15"/>
><12 c1="224"  c2="86"  c3="20"/>
><13 c1="229"  c2="130"  c3="21"/>
>
>
> AHA, I see my first error. I forgot to add the '/' to close the paragraph.
> I am VERY RUSTY at this.
>
> Gdal was complaining about not being able to close the file and refering
> me to  and
>  which confused me greatly as I didn't touch it at all.
>
> Now it runs, but fails because it tells me my datatype is not compatiable.
> This is a different issue I will take up separately as I expect has
> nothing to do with GDAL.
>
> Many thanks. Will keep at it.
>
>
>
> On 2012/09/26 11:54, Chaitanya kumar CH wrote:
>
> Sam,
>
> What did you do? What errors did you get?
>
> On Wed, Sep 26, 2012 at 12:23 PM, Samantha Goodchild-Brown <
> samant...@geograph.co.za> wrote:
>
>> I need to change a greyscale image to Palette and specify the colors to
>> use for specific values.
>>
>> However I am getting very confused with all the 'comments' and references
>> and instructions
>>
>> eg.
>> In "
>> http://trac.osgeo.org/gdal/wiki/FAQRaster#Howtocreateormodifyanimagecolortable";
>> it is explained how to edit a VRT to make a new tif with a color palette of
>> your choice.
>> However in later 'fishings' I saw someone mention that this doesn't work
>> and that the only way to do it is with scripting or programming.
>>
>> I am now also trying as it seems to be the simplest method but I am also
>> failing.
>>
>> Other tickets etc that come close are in the region of 4 years old etc
>> and way over my head.
>>
>> Besides the obvious (gdal error messages), can anyone tell me why this is
>> happening? what I need to tweek? if a fix is on the way? is it still valid
>> that the only workaround is with scripting?
>> Does anyone know of another open source method that doesn't involve
>> scripting?
>>
>> Many thanks
>> Sam
>> ___
>> gdal-dev mailing list
>> gdal-dev@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
>
>
> --
> Best regards,
> Chaitanya kumar CH.
>
> +91-9494447584
> 17.2416N 80.1426E
>
>
>


-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] how to create an image with a colortable?

2012-09-26 Thread Chaitanya kumar CH
Sam,

What did you do? What errors did you get?

On Wed, Sep 26, 2012 at 12:23 PM, Samantha Goodchild-Brown <
samant...@geograph.co.za> wrote:

> I need to change a greyscale image to Palette and specify the colors to
> use for specific values.
>
> However I am getting very confused with all the 'comments' and references
> and instructions
>
> eg.
> In " http://trac.osgeo.org/gdal/**wiki/FAQRaster#**
> Howtocreateormodifyanimagecolo**rtable<http://trac.osgeo.org/gdal/wiki/FAQRaster#Howtocreateormodifyanimagecolortable>"
> it is explained how to edit a VRT to make a new tif with a color palette of
> your choice.
> However in later 'fishings' I saw someone mention that this doesn't work
> and that the only way to do it is with scripting or programming.
>
> I am now also trying as it seems to be the simplest method but I am also
> failing.
>
> Other tickets etc that come close are in the region of 4 years old etc and
> way over my head.
>
> Besides the obvious (gdal error messages), can anyone tell me why this is
> happening? what I need to tweek? if a fix is on the way? is it still valid
> that the only workaround is with scripting?
> Does anyone know of another open source method that doesn't involve
> scripting?
>
> Many thanks
> Sam
> __**_
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/gdal-dev<http://lists.osgeo.org/mailman/listinfo/gdal-dev>
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] gdal dataset

2012-09-07 Thread Chaitanya kumar CH
Neelima,

Perhaps I didn't understand your question.

You said that it was asking for a dataset. How did it ask?
What were the error messages you got?

In your future queries, please include as much information as you can
provide.

On Fri, Sep 7, 2012 at 12:42 PM, Neelima Emmani <
neelima.emm...@iictechnologies.com> wrote:

>  Hi Chaitanya,
> How did you  do that. What version of gdal are you using. Can you please
> share your code snipplet with me.
>
> With Regards,
> Neelima Emmani
>
>   ----------
> *From:* Chaitanya kumar CH [chaitanya...@gmail.com]
> *Sent:* Friday, September 07, 2012 12:04 PM
> *To:* Neelima Emmani
> *Cc:* gdal-dev@lists.osgeo.org
> *Subject:* Re: [gdal-dev] gdal dataset
>
>  Neelima,
>
> For me specifying the .000 file to ogrinfo and ogr2ogr worked.
>
> On Fri, Sep 7, 2012 at 11:32 AM, Neelima Emmani <
> neelima.emm...@iictechnologies.com> wrote:
>
>>  Hi All,
>> I have generated gdal , ogr , osr dlls and added them to my c# project.
>> Now i am trying to run the application that is given in gdal download which
>> is named as gdalread.cs.When I run it , it is asking for a dataset . Can
>> any one let me know if i have to specify filename over here. Actually i
>> want to read enc file which has s57 datset. So, I am confused if i need to
>> specify filelname or s57 over here.
>> Awaiting reply.
>>
>> With Regards,
>> Neelima Emmani
>>
>> ___________
>> gdal-dev mailing list
>> gdal-dev@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
>
>
> --
> Best regards,
> Chaitanya kumar CH.
>
> +91-9494447584
> 17.2416N 80.1426E
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] gdal dataset

2012-09-06 Thread Chaitanya kumar CH
Neelima,

For me specifying the .000 file to ogrinfo and ogr2ogr worked.

On Fri, Sep 7, 2012 at 11:32 AM, Neelima Emmani <
neelima.emm...@iictechnologies.com> wrote:

>  Hi All,
> I have generated gdal , ogr , osr dlls and added them to my c# project.
> Now i am trying to run the application that is given in gdal download which
> is named as gdalread.cs.When I run it , it is asking for a dataset . Can
> any one let me know if i have to specify filename over here. Actually i
> want to read enc file which has s57 datset. So, I am confused if i need to
> specify filelname or s57 over here.
> Awaiting reply.
>
> With Regards,
> Neelima Emmani
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] gdal + C#

2012-09-05 Thread Chaitanya kumar CH
Neelima,

GDAL's C# interface binaries are not maintained well. So it is better to
compile to get the latest version.

If you are going to use the dlls available elsewhere, make sure you have
them all.
http://trac.osgeo.org/gdal/wiki/GdalOgrCsharpCompile#Compilingthecode shows
a list of those files.

On Thu, Sep 6, 2012 at 10:56 AM, Neelima Emmani <
neelima.emm...@iictechnologies.com> wrote:

>  Hi Chaitanya,
> Yeah, i went through the document and tried to compile gdal . And  gives
> me a nmake fatal error:1077 that it is not able to find swig.exe.Yes, in my
> folder of swig which is under gdal  doesnot consist of swig.exe, so, do i
> need to download it from external source. If so, even tried the same. But
> no result.
>
> My questions -
>
>- Do i need to really compile the gdal-1.9.1
>- Can i use few dll's that are available on net like gdal_csharp,
>ogr_csharp, osr_csharp. But unfortunately, this option also did not work
>for me. Here, the C# accepted dlls. But popping up an error, when i ask it
>to ogr.registerall() or when i use any other gdal inbuilt functionalities.
>
> awaiting reply.
>  With Regards,
> Neelima Emmani
> GIS Developer
>   --
> *From:* Chaitanya kumar CH [chaitanya...@gmail.com]
> *Sent:* Thursday, September 06, 2012 10:31 AM
> *To:* Neelima Emmani
> *Cc:* gdal-dev@lists.osgeo.org
> *Subject:* Re: [gdal-dev] gdal + C#
>
>  Neelima,
>
> Please go through the documentation in the website.
> http://trac.osgeo.org/gdal/wiki/GdalOgrInCsharp
>
> On Thu, Sep 6, 2012 at 10:31 AM, Neelima Emmani <
> neelima.emm...@iictechnologies.com> wrote:
>
>>  Hi All,
>>
>> Actually i want to access gespatial data using GDAL into C#. For this I
>> tried to add gdal reference to C#. I took gdal1.9 download from gdal
>> website. Inwhich i found gdai19.dll . And then tried to add this as a
>> reference to c# . But unfortunately, C# is popping me up with an error msg.
>> Does anyone know how to read geospatial data into c#.
>> Awaiting reply.
>> With Regards,
>> Neelima Emmani
>> GIS Developer
>>
>>
>> ___
>> gdal-dev mailing list
>> gdal-dev@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
>
>

-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Odd behavior with OGR2OGR and arcSDE - tries to copy multiple layers.

2012-09-05 Thread Chaitanya kumar CH
Yes.

Perhaps the SDE driver is reading the other layers as well. In the docs it
says that specifying the layer name in the SDE string will make the driver
skip reading the summary metadata for other layers. But it may still report
the other layers to ogr2ogr.

So, specifying the layer to ogr2ogr will ensure that other layers are
skipped.

On Thu, Sep 6, 2012 at 10:41 AM, Phil Scadden  wrote:

>
> >
> > Try the same command with the ArcSDE layer name specified at the end
> > for ogr2ogr.
> You  mean?
> ogr2ogr -f "PostgreSQL" PG:"host=myhost user=myuser dbname=mydb
> password=** port=5432" -nln postgis_name
> SDE:SDE,5151,,***,,sde_name sde_name
>
> I wonder why "layer" in the SDE format string seemed to be optional.
>
>
> Notice: This email and any attachments are confidential. If received in
> error please destroy and immediately notify us. Do not copy or disclose the
> contents.
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] gdal + C#

2012-09-05 Thread Chaitanya kumar CH
Neelima,

Please go through the documentation in the website.
http://trac.osgeo.org/gdal/wiki/GdalOgrInCsharp

On Thu, Sep 6, 2012 at 10:31 AM, Neelima Emmani <
neelima.emm...@iictechnologies.com> wrote:

>  Hi All,
>
> Actually i want to access gespatial data using GDAL into C#. For this I
> tried to add gdal reference to C#. I took gdal1.9 download from gdal
> website. Inwhich i found gdai19.dll . And then tried to add this as a
> reference to c# . But unfortunately, C# is popping me up with an error msg.
> Does anyone know how to read geospatial data into c#.
> Awaiting reply.
> With Regards,
> Neelima Emmani
> GIS Developer
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Odd behavior with OGR2OGR and arcSDE - tries to copy multiple layers.

2012-09-05 Thread Chaitanya kumar CH
Phil,

Try the same command with the ArcSDE layer name specified at the end for
ogr2ogr.

On Thu, Sep 6, 2012 at 4:41 AM, Phil Scadden  wrote:

> If I copy a set from sde to postgis with:
>
> ogr2ogr -f "PostgreSQL" PG:"host=myhost user=myuser dbname=mydb
> password=** port=5432" -nln postgis_name
> SDE:SDE,5151,,***,,sde_name
>
> then the process works but then it comes with a message
> FAILED: layer aready exists and -append not specified, but reports that
> it is trying to copy a completely different layer from the one specified
> in SDE. It is a valid sde layer. If I put -overwrite switch in, then
> something even more curious happens. It appears to go through all the
> layers in sde and one by one replaces the postgis layer with each (I
> discovered by interrupting the process or looking at data in postgis).
>
> I am using GDAL from stable version of MS4W, with the sde dlls for
> arcSDE 9.3
>
> --
> Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St,
> Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477
> 5232
>
> Notice: This email and any attachments are confidential. If received in
> error please destroy and immediately notify us. Do not copy or disclose the
> contents.
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Gdalinfo is missing documentation for -approx_stats

2012-09-04 Thread Chaitanya kumar CH
Jukka,

The option -approx_stats is useful if you want less precise statistics in
less time.
Updated the dox in the revision 24905 and 24906.

Thanks for the notice Jukka.


On Tue, Sep 4, 2012 at 6:33 PM, Piotr Tracz  wrote:

>  W dniu 2012-09-04 14:53, Jukka Rahkonen pisze:
>
> I was reading from Quantum GIS mailing list that there exists an -approx_stats
> option in gdalinfo utility but it is not documented 
> inhttp://www.gdal.org/gdalinfo.html
>
> It looks like the author did not bother to report the issue here so I did 
> even I
> do not know what is the purpose of this approx_stats thing.
>
>
>  Here you go with purpose of it:
>
> http://www.gdal.org/classGDALRasterBand.html#a6aa58b6f0a0c17722b9bf763a96ff069
>
> -approx_stats sets *bApproxOK as true.
>
> /Piotr
> *
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] How to cut a Raster map with a KML file

2012-09-03 Thread Chaitanya kumar CH
Luis,

gdalwarp has some options for this exact purpose.
The cutline can be from any of the OGR readable datasource.

http://www.gdal.org/gdalwarp.html

On Mon, Sep 3, 2012 at 9:34 PM, Luis Lisboa wrote:

> Greetings
> I have a raster file (Geotiff) and I have a KML file with a polygon and I
> want to cut raster map to only have valid values inside the polygon. How
> can I do this using just GDAL?
>
> Usually I used to cut geotiff file with gdalwarp and but in those cases I
> was cutting a square (xmin xmax ymin ymax) and in this case is a more
> complex polygon
>
> Thanks
> Regards,
> Luis
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] How to compile "GDAL from gdal trunk" and qgis from source?

2012-08-30 Thread Chaitanya kumar CH
Laurent,

Compilation is easy as long as you don't run into any obstacles :-)

Follow these links to read how to get the latest source and how to compile
it for Microsoft Windows.
GDAL:
http://trac.osgeo.org/gdal/wiki/DownloadSource#Subversion
http://trac.osgeo.org/gdal/wiki/BuildingOnWindows
QGIS:
http://hub.qgis.org/projects/quantum-gis/wiki/Download#61-Source-Code
http://www.qgis.org/api/INSTALL.html#toc13

On Thu, Aug 30, 2012 at 1:40 PM, laurent celati <
lcel...@latitude-geosystems.com> wrote:

> Hello,
>
> I have posted a message there a few weeks. I asked you a way to compile the
> "last Gdal version from trunk" and Qgis from source targeting your gdal
> source as library in order to use the last Gdal postis raster driver. You
> answered that the last binairies qgis 1.8 version is available with the
> last
> version of gdal (1.9.1) and that it's useless to compile.
>
> I understand your reply. BUT I have talked last days with developpers of
> "Gdal Postgis raster driver". They just add several important updates to
> the
> driver. And they confirm to me that the only way to use the last driver is
> to compile GDAL from gdal trunk and qgis from source using that compilation
> as GDAL version.
> Please to read below few sentences written by those developpers :
> --
> That's the only way to get the development version working. You have to
> compile GDAL from svn and qgis from source using that compilation as GDAL
> version.
> I'm not following osgeo4w binaries, but I don't think they would
> provide a QGIS build with both gdal and qgis from svn. It's not entirely
> impossible because I know they release a few nightly snapshots.
> So, you have to use the last GDAL version from trunk in order to have the
> last "Gdal Postgis raster driver updates".You just need to compile QGIS
> from
> source targeting your GDAL source as library.I think that if you make any
> header changes you may need to recompile it all since QGIS depends on
> GDAL.So you have to work with last gdal version from trunk.
> --
>
> I need this last version of Gdal Postgis raster driver on my windows 7-64
> bits station but those developpers working on Linux.
> Could you explain to me the way to compile GDAL from gdal trunk and qgis
> from source using that compilation as GDAL version (sources links to
> download, compilation procédure,etc.). I am a thematician geograph and i am
> a novice in software compilation;-(
>
> In advance, thank you for your reply.
>
> Kind regards.
>
> Laurent Celati
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.n6.nabble.com/How-to-compile-GDAL-from-gdal-trunk-and-qgis-from-source-tp4998802.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev




-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Problem when resizing main frame in Windows 7.

2012-08-28 Thread Chaitanya kumar CH
Ramiro,

This is not the mailing list for wx.

On Tue, Aug 28, 2012 at 11:12 PM, Ramiro Gonzalez <
ramirogonza...@suremptec.com.ar> wrote:

> Hi,
>
> I use wx 2.8.12 in a multiplatform application, I have been having a
> problem with the layout when I resize the main Frame, but '''only happens
> in Windows 7'''.
>
> I couldn't find the source of the problem, so I was hoping someone could
> help me with it.
>
> My application have several wxPanels composed in a tree structure with
> sizers, after resizing the top level window, the layout algorithm executes,
> but stops before reaching the last few panels(near leafs, and only in one
> branch of the tree). This branch of the tree is 8/9 panels in lenght.
>
> I looked closely to the state of the sizers in that branch, and find out
> that one of the sizer's dimension was not being updated, so its dimension
> was different to the size of the containing window.
> {{{
> Window size: h 891 s 1076
> Sizer size: h 389 s 656
> }}}
>
> While debugging, I added a panel several levels up in the tree(containing
> the inconsistent panel). After this, the bug moved one level up, that is,
> the inconsistency between the windows an the sizer now happened in the
> parent of the previously broken window.
>
> As a temporal fix, I am listening for wxEVT_SIZE in one of the
> parents(before broken sizer) and manually fixing the Size mismatch:
> {{{
> void FixSizers(wxWindow* pWindow) {
>if(!pWindow->IsShown())
>   return;
>
>wxSize windowsize =  pWindow->GetSize();
>if (pWindow->GetSizer())
>   pWindow->GetSizer()->SetDimension(0, 0, windowsize.GetWidth(),
> windowsize.GetHeight());
>
>wxWindowList& children = pWindow->GetChildren();
>for (size_t i = 0; i < children.size(); i++)
>   FixSizers(children[i]);
> }
> }}}
>
> This solved the problem, but I would like to know if this has happened to
> someone else, and what could be a probable cause of this behaviour?
>
> Thanks
> Ramiro
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] gdal info in python script

2012-08-28 Thread Chaitanya kumar CH
Neha,

You can use the subprocess module of Python.

On Tue, Aug 28, 2012 at 2:06 PM, Neha Bijalwan wrote:

> how to use gdalinfo with python script? i intend to store the result
> of gdalinfo for a raster into a variable and display it, the end
> result being the output of gdalinfo being displayed? how is it
> possible?
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] problem with CloseRings

2012-08-22 Thread Chaitanya kumar CH
3.43,559560.19 142169.94),(559564.97 142168.32,559560.19
> > 142169.94,559564.97 142168.32),(559577.81000172295
> > 142165.04,559571.34395208011847 142166.499739240010967,559564.97
> > 142168.32,559577.81000172295 142165.04))"
> >
> > poly = ogr.CreateGeometryFromWkt(wkt)
> >
> > poly.IsValid()
> > ERROR 1: IllegalArgumentException: Invalid number of points in
> > LinearRing found 3 - must be 0 or >= 4
> > False
> >
> > poly.CloseRings()
> >
> > poly.IsValid()
> > ERROR 1: IllegalArgumentException: Invalid number of points in
> > LinearRing found 3 - must be 0 or >= 4
> > False
> > ___
> > gdal-dev mailing list
> > gdal-dev@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
>
> --
>
> ---+--
> I set the clouds in motion - turn up   | Frank Warmerdam,
> warmer...@pobox.com
> light and sound - activate the windows |
> <http://lists.osgeo.org/mailman/listinfo/gdal-dev>
> http://pobox.com/~warmerdam
> and watch the world go round - Rush| Geospatial Software Developer
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
>  <http://pobox.com/%7Ewarmerdam>
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Windows 32 bit GDAL

2012-08-05 Thread Chaitanya kumar CH
http://trac.osgeo.org/osgeo4w/

On Mon, Aug 6, 2012 at 8:17 AM, Billy Newman  wrote:

> Anyone know where I can get windows 32 bit GDAL libs pre-compiled with
> Java bindings?
>
> Thanks,
> Billy
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] gdalbuildvrt problem with heterogenous band characteristics

2012-07-31 Thread Chaitanya kumar CH
Casper,

You can edit the vrt file in a text editor. Just make a copy of the
elements of one file and change them according to the fourth file. You can
refer to the VRT tutorial[1] if you have any doubts.

Can you provide the full gdalinfo report of the two files?

[1]: http://www.gdal.org/gdal_vrttut.html

On Tue, Jul 31, 2012 at 7:16 PM, Casper Børgesen (CABO) wrote:

>  What do you mean by manually? I run gdalbuildvrt using the command line,
> so I don’t understand how it can be done more manually J
>
> ** **
>
> gdalbuildvrt myfile.vrt file1.tif file2.tif file3.tif file4.tif
>
> ** **
>
> I have tried using an old version of gdalinfo (1.7.0) and it gives tells
> me that my first 3 bands in the old file contains a mask flag:
>
> ** **
>
> Mask Flags: PER_DATASET ALPHA
>
> ** **
>
> This flag is not present in the 3 new files. Could this be the reason? ***
> *
>
> ** **
>
> Btw. my normal version of gdal is 1.9.
>
> ** **
>
> Regards, Casper
>
> ** **
>
> *From:* Chaitanya kumar CH [mailto:chaitanya...@gmail.com]
> *Sent:* 31. juli 2012 15:30
> *To:* Casper Børgesen (CABO)
> *Cc:* gdal-dev@lists.osgeo.org
> *Subject:* Re: [gdal-dev] gdalbuildvrt problem with heterogenous band
> characteristics
>
> ** **
>
> Casper,
>
> This message should not appear unless there is a difference in the band
> data type, colour interpretation or the band order.
> Can you check if manually adding the old file works?
>
> On Mon, Jul 30, 2012 at 11:01 PM, Casper Børgesen (CABO) 
> wrote:
>
> Hi! 
>
>  
>
> I’m trying to create a VRT file from 4 GeoTIFFs using gdalbuildvrt. Three
> of the GeoTIFFs are created using OrthoVista and the last one created with
> an earlier version of the same program. When I run gdalbuildvrt I get the
> following error message when I try to add the file created by the early
> version: 
>
>  
>
> Warning 6: gdalbuildvrt does not support heterogenous band
> characteristics. Skipping...
>
>  
>
> Running gdalinfo on the 4 files I see only a difference in the metadata
> section (and of course in the coordinates). 
>
> In the following is the band information from two of the files:
>
>  
>
> [From new version]
>
> Band 1 Block=6250x20 Type=Byte, ColorInterp=Red
>
>   Overviews: 1024x1024
>
> Band 2 Block=6250x20 Type=Byte, ColorInterp=Green
>
>   Overviews: 1024x1024
>
> Band 3 Block=6250x20 Type=Byte, ColorInterp=Blue
>
>   Overviews: 1024x1024
>
> Band 4 Block=6250x20 Type=Byte, ColorInterp=Undefined
>
>   Overviews: 1024x1024
>
>  
>
> [From earlier version]
>
> Band 1 Block=6250x20 Type=Byte, ColorInterp=Red
>
>   Overviews: 1024x1024
>
> Band 2 Block=6250x20 Type=Byte, ColorInterp=Green
>
>   Overviews: 1024x1024
>
> Band 3 Block=6250x20 Type=Byte, ColorInterp=Blue
>
>   Overviews: 1024x1024
>
> Band 4 Block=6250x20 Type=Byte, ColorInterp=Undefined
>
>   Overviews: 1024x1024
>
>  
>
> To me they seem identical and I can display them both using QGis 1.8. I
> guess that the difference is deeper inside the TIFFs than gdalinfo informs
> me about – what can I do to avoid this problem?
>
>  
>
> Regards Casper
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
>
>
> --
> Best regards,
> Chaitanya kumar CH.
>
> +91-9494447584
> 17.2416N 80.1426E
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] gdalbuildvrt problem with heterogenous band characteristics

2012-07-31 Thread Chaitanya kumar CH
Casper,

This message should not appear unless there is a difference in the band
data type, colour interpretation or the band order.
Can you check if manually adding the old file works?

On Mon, Jul 30, 2012 at 11:01 PM, Casper Børgesen (CABO) wrote:

>  Hi! 
>
> ** **
>
> I’m trying to create a VRT file from 4 GeoTIFFs using gdalbuildvrt. Three
> of the GeoTIFFs are created using OrthoVista and the last one created with
> an earlier version of the same program. When I run gdalbuildvrt I get the
> following error message when I try to add the file created by the early
> version: 
>
> ** **
>
> Warning 6: gdalbuildvrt does not support heterogenous band
> characteristics. Skipping...
>
> ** **
>
> Running gdalinfo on the 4 files I see only a difference in the metadata
> section (and of course in the coordinates). 
>
> In the following is the band information from two of the files:
>
> ** **
>
> [From new version]
>
> Band 1 Block=6250x20 Type=Byte, ColorInterp=Red
>
>   Overviews: 1024x1024
>
> Band 2 Block=6250x20 Type=Byte, ColorInterp=Green
>
>   Overviews: 1024x1024
>
> Band 3 Block=6250x20 Type=Byte, ColorInterp=Blue
>
>   Overviews: 1024x1024
>
> Band 4 Block=6250x20 Type=Byte, ColorInterp=Undefined
>
>   Overviews: 1024x1024
>
> ** **
>
> [From earlier version]
>
> Band 1 Block=6250x20 Type=Byte, ColorInterp=Red
>
>   Overviews: 1024x1024
>
> Band 2 Block=6250x20 Type=Byte, ColorInterp=Green
>
>   Overviews: 1024x1024
>
> Band 3 Block=6250x20 Type=Byte, ColorInterp=Blue
>
>   Overviews: 1024x1024
>
> Band 4 Block=6250x20 Type=Byte, ColorInterp=Undefined
>
>   Overviews: 1024x1024
>
> ** **
>
> To me they seem identical and I can display them both using QGis 1.8. I
> guess that the difference is deeper inside the TIFFs than gdalinfo informs
> me about – what can I do to avoid this problem?
>
> ** **
>
> Regards Casper
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] How to concatenate with newlines by using OGR SQL?

2012-07-31 Thread Chaitanya kumar CH
Jukka,

This should work:

ogr2ogr -f gpx test.gpx finland.osm.pbf -sql ^
*More? *"select name,CONCAT(addr_street,'^
*More? *
*More? *',addr_housenumber) as 'desc' from points where amenity='toilets'"

Note that the "More? " part is given by DOS. By giving ^ at the end of line
you are saying that there is more stuff to come. If you simply press
'return' when it prompts for more, it will treat it as a newline char and
ask for more one more time.

DOS treats ^ as a quote character.

On Tue, Jul 31, 2012 at 1:06 PM, Rahkonen Jukka
wrote:

>  Hi,
>
> ** **
>
> Sorry, I forgot to tell that I am on Windows.  “$’\n’” looks so gurutic
> that I feel jealous. I hope I will never need to teach anybody to use it at
> work, though J
>
> ** **
>
> -Jukka-
>
> ** **
>
> Chaitanya kumar wrote:
>
> ** **
>
> Jukka,
>
> You can try to pass the newline character directly from the command line.
> With bash, you can use $'\n'. In your case it will be like this:
>
> ogr2ogr -f gpx test.gpx finland.osm.pbf
> -sql "select name,CONCAT(addr_street,"$'\n'",addr_housenumber)
> as 'desc' from points where amenity='toilets'"
>
> On Tue, Jul 31, 2012 at 12:09 PM, Jukka Rahkonen <
> jukka.rahko...@mmmtike.fi> wrote:
>
> Hi,
>
> I was playing with the new OSM driver and tried to transfer some
> POI features into my GPS. It goes well by using GPX format in
> between. However, I have a little problem. My GPS supports multiline
> descriptions but I do not know how to insert newlines into the
> output of ogr2ogr. The following command adds a space character
> between addr_street and addr_housenumber, but is is somehow possible
> to insert newline instead?
>
> ogr2ogr -f gpx test.gpx finland.osm.pbf
> -sql "select name,CONCAT(addr_street,' ',addr_housenumber)
> as 'desc' from points where amenity='toilets'"
>
> I made two blind trials as
> CONCAT(addr_street,\n,addr_housenumber) which gives parsing error and
> CONCAT(addr_street,'\n',addr_housenumber) which adds string \n literally.
>
> -Jukka Rahkonen-
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
>
>
> --
> Best regards,
> Chaitanya kumar CH.
>
> +91-9494447584
> 17.2416N 80.1426E
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] How to concatenate with newlines by using OGR SQL?

2012-07-31 Thread Chaitanya kumar CH
Jukka,

You can try to pass the newline character directly from the command line.
With bash, you can use $'\n'. In your case it will be like this:

ogr2ogr -f gpx test.gpx finland.osm.pbf
-sql "select name,CONCAT(addr_street,"$'\n'",addr_housenumber)
as 'desc' from points where amenity='toilets'"

On Tue, Jul 31, 2012 at 12:09 PM, Jukka Rahkonen
wrote:

> Hi,
>
> I was playing with the new OSM driver and tried to transfer some
> POI features into my GPS. It goes well by using GPX format in
> between. However, I have a little problem. My GPS supports multiline
> descriptions but I do not know how to insert newlines into the
> output of ogr2ogr. The following command adds a space character
> between addr_street and addr_housenumber, but is is somehow possible
> to insert newline instead?
>
> ogr2ogr -f gpx test.gpx finland.osm.pbf
> -sql "select name,CONCAT(addr_street,' ',addr_housenumber)
> as 'desc' from points where amenity='toilets'"
>
> I made two blind trials as
> CONCAT(addr_street,\n,addr_housenumber) which gives parsing error and
> CONCAT(addr_street,'\n',addr_housenumber) which adds string \n literally.
>
> -Jukka Rahkonen-
>
>
> _______
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] How to fix "Error 1: Invalid Index : -1"

2012-07-25 Thread Chaitanya kumar CH
Tai,

Please provide some more details. OGR Feature definition stores the fields
in a zero based array.

On Wed, Jul 25, 2012 at 1:29 PM, taibc  wrote:

> Hi friends,
>
> My program use GEO and GDAL (with Visual Studio 2010, C++). After running
> the program, there are many error messages: Error 1: Invalid Index : -1
> (More than 1000 errors).
>
> Although I set environment variable: GDAL_DATA = C:\gdal\data by modifying
> settings of My Computer and Visual Studio, but still got these errors.
>
> Do you know how to fix it ?
>
> Thanks and regards,
> Tai
>
>
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.n6.nabble.com/How-to-fix-Error-1-Invalid-Index-1-tp4990687.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] How to change displayed decimal places of double type in the method: OGRFeature::SetField

2012-07-24 Thread Chaitanya kumar CH
Tai,

DBF formats allows specifying the precision of decimal values.
Check the field definition of the .dbf file using ogrinfo. If it shows a
precision of 2, you did all you can with OGR.

Excel, on the other hand, may have different rules. There is not much that
can be done with .dbf files to control the view in Excel.

On Wed, Jul 25, 2012 at 9:56 AM, taibc  wrote:

> Hi friends,
>
> I used the method: OGRFeature:SetField(int i, double dfValue) to set field
> values of a shapefile file (.dbf file).
>
> I changed dfValue format to display 2 digits in decimal places. But, when I
> used the Excel to see values, it showed an unexpected result.
>
> For example:
> First, dfValue = 2688.74923
> After changing format (by using code), dfValue = 2688.75
>
> But, when I saw values in the excel, it showed: 2688,750 (not
> 2688.75)
>
> How can I fix it (don't need change format settings in excel)?
>
> Thanks and regards,
> Tai
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.n6.nabble.com/How-to-change-displayed-decimal-places-of-double-type-in-the-method-OGRFeature-SetField-tp4990648.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] add string field to img

2012-07-24 Thread Chaitanya kumar CH
Derek,

You can add this info as meta-data tags. You will have to define your own
names for the keys. Something like pix_1_class, pix_2_class, etc.

To add these you can use the -mo option with gdal_translate[1] or use a vrt
file[2]. You can create such a vrt file using gdal_translate too by setting
the output format (-of) to VRT.

[1]: http://www.gdal.org/gdal_translate.html
[2]: http://www.gdal.org/gdal_vrttut.html

On Tue, Jul 24, 2012 at 7:27 PM, jdmorgan  wrote:

> Hello,
> I was hoping someone could help me out.  I have a raster .img file. with
> existing pixel values.  Those values are integer, but are classed to string
> values not currently in the same .img file.  For example pixel value 2
> means ClassTwo. Is it possible to add the string values (a new field) onto
> the raster .img file?
>
> Thanks,
> Derek
> __**_
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/gdal-dev<http://lists.osgeo.org/mailman/listinfo/gdal-dev>
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Batch conversion ECW to TIFF

2012-07-24 Thread Chaitanya kumar CH
Zoltan,

These are a bit outdated but still usable.
http://trac.osgeo.org/gdal/wiki/ECW
http://trac.osgeo.org/ubuntugis/wiki/UserTutorials

On Tue, Jul 24, 2012 at 1:14 PM, Zoltan Szecsei wrote:

> Hi GDALers,
>
> I need to convert ECW files to GeoTIFF (and not the other way round).
> I have 20 or so files now, but will be getting >1000 of them, so batch
> must be the way to go.
>
> I would prefer a linux solution, but I see that the "free" Erdas SDK is
> only for windows.
> On my Win7 (64 bit) box I only have Qt 4.7.4 (32 bit) [built Jan 26 2012
> version]. The Qt Creator version is 2.4.1
>
> I have minimal experience with Qt so my question is is:
>
> What is my best way forward?
> Is there a Linux command line solution?
>
> Thanks in advance,
> Zoltan
>
>
> --
>
> ==**=
> Zoltan Szecsei PrGISc [PGP0031]
> Geograph (Pty) Ltd.
> P.O. Box 7, Muizenberg 7950, South Africa.
>
> 65 Main Road, Muizenberg 7945
> Western Cape, South Africa.
>
> 34° 6'16.35"S 18°28'5.62"E
>
> Tel: +27-21-7884897  Mobile: +27-83-6004028
> Fax: +27-86-6115323 www.geograph.co.za
> ==**=
>
> __**_
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/gdal-dev<http://lists.osgeo.org/mailman/listinfo/gdal-dev>
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] How to identify a point is belong to a polygon ?

2012-07-24 Thread Chaitanya kumar CH
Tai,

Geos code is not enabled in GDAL without the third line you omitted.
Check the compilation messages to identify the problem.
Perform a 'clean' before you build until this problem is resolved.

On Tue, Jul 24, 2012 at 12:48 PM, taibc  wrote:

> Thanks Chaitanya,
>
> I modified as your suggestion. But, still got the error (GEOS support not
> enable) when executing the program.
> About building GEOS, if I only add two first lines, the process will be
> sucessful:
>
> 1. GEOS_DIR = C:/geos-3.3.5
> 2. GEOS_LIB = $(GEOS_DIR)/src/geos_c_i.lib
>
> if I add third line, the building process will get errors
> 3. GEOS_CFLAGS = -I$(GEOS_DIR)/capi -I$(GEOS_DIR)/include/geos
> -DHAVE_GEOS
>
> Errors:
> LINK : fatal error LNK1181: cannot open input file
> 'ogr\ogrsf_frmts\ogrsf_frmts.
> lib'
>
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
> 10.0\VC\BI
> N\lib.EXE"' : return code '0x49d'
> Stop.
>
> Thanks and regards,
>
> Tai
>   --
> *From:* chaitanya_ch [via OSGeo.org] <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4990291&i=0>
> >
> *To:* taibc <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4990291&i=1>>
>
> *Sent:* Tuesday, July 24, 2012 12:48 PM
>
> *Subject:* Re: How to identify a point is belong to a polygon ?
>
>  Tai,
>
> The environment variables can be set at the command prompt temporarily
> using
>
> SET LD_LIBRARY_PATH=C:\path\to\gdal\libraries
> SET GDAL_DATA=C:\path\to\gdal\libraries\data
>
> You can set them in the project settings in VC++. I don't know how.
> You can also set them system wide at MyComputer->Settings.
>
>
>
> --
> View this message in context: Re: How to identify a point is belong to a
> polygon 
> ?<http://osgeo-org.1560.n6.nabble.com/How-to-identify-a-point-is-belong-to-a-polygon-tp4989501p4990291.html>
> Sent from the GDAL - Dev mailing list 
> archive<http://osgeo-org.1560.n6.nabble.com/GDAL-Dev-f3742093.html>at 
> Nabble.com.
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] How to identify a point is belong to a polygon ?

2012-07-23 Thread Chaitanya kumar CH
Tai,

The environment variables can be set at the command prompt temporarily
using

SET LD_LIBRARY_PATH=C:\path\to\gdal\libraries
SET GDAL_DATA=C:\path\to\gdal\libraries\data

You can set them in the project settings in VC++. I don't know how.
You can also set them system wide at MyComputer->Settings.

On Tue, Jul 24, 2012 at 9:50 AM, taibc  wrote:

> Thanks Chaitanya,
>
> I haven't set LD_LIBRARY_PATH and GDAL_DATA yet.
>
> Do you know how to set them on Visual C++ 2010 ?
>
> Kind regards,
> Tai
>
>   --
> *From:* chaitanya_ch [via OSGeo.org] <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4990251&i=0>
> >
> *To:* taibc <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4990251&i=1>>
>
> *Sent:* Tuesday, July 24, 2012 10:38 AM
>
> *Subject:* Re: How to identify a point is belong to a polygon ?
>
>  Tai,
>
> If your rebuild was successful with geos, the only reason for you to get
> the error is that the application is accessing the wrong libraries
> somewhere in your system. Do a clean rebuild and make sure the
> LD_LIBRARY_PATH and GDAL_DATA are set correctly.
>
> On Tue, Jul 24, 2012 at 7:37 AM, taibc <[hidden email]> wrote:
>
> Thanks Mateusz,
>
> I edited the nmake.opt by adding below lines:
>
> GEOS_DIR = C:/geos-3.3.5
> GEOS_LIB = $(GEOS_DIR)/src/geos_c_i.lib
> GEOS_CFLAGS = -I$(GEOS_DIR)/capi -I$(GEOS_DIR)/include/geos -DHAVE_GEOS
>
> Then, I rebuilt GDAL, but still got the error: "GEOS support not enable".
>
> Kind regards,
>
> Tai
>   --
> *From:* Mateusz Loskot [via OSGeo.org <http://osgeo.org/>] <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4990235&i=0>
> >
> *To:* taibc <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4990235&i=1>>
>
> *Sent:* Monday, July 23, 2012 5:56 PM
> *Subject:* Re: How to identify a point is belong to a polygon ?
>
>  On 23 July 2012 11:52, taibc <[hidden email]> wrote:
> > I installed GEOS succesfful, and copy file geos.dll into my project. But
> I
> > still got the error: "GEOS support not enable" when using the method
> > "Within"
> >
> > Are there something wrongs ?
>
> You need to edit nmake.opt and rebuild GDAL.
> Check this thread:
> http://lists.osgeo.org/pipermail/gdal-dev/2010-March/023829.html
>
> Best regards,
> --
> Mateusz Loskot, http://mateusz.loskot.net
> ___
> gdal-dev mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://osgeo-org.1560.n6.nabble.com/How-to-identify-a-point-is-belong-to-a-polygon-tp4989501p4990029.html
>  To unsubscribe from How to identify a point is belong to a polygon ?, click
> here.
> NAML<http://osgeo-org.1560.n6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
> --
> View this message in context: Re: How to identify a point is belong to a
> polygon 
> ?<http://osgeo-org.1560.n6.nabble.com/How-to-identify-a-point-is-belong-to-a-polygon-tp4989501p4990235.html>
>
> Sent from the GDAL - Dev mailing list 
> archive<http://osgeo-org.1560.n6.nabble.com/GDAL-Dev-f3742093.html>at
> Nabble.com <http://nabble.com/>.
>
> ___
> gdal-dev mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
>
>
> --
> Best regards,
> Chaitanya kumar CH.
>
> +91-9494447584
> 17.2416N 80.1426E
>
> ___
> gdal-dev mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://osgeo-org.1560.n6.nabble.com/How-to-identify-a-point-is-belong-to-a-polygon-tp4989501p4990248.html
>  To unsubscribe from How to identify a point is belong to a polygon ?, click
> here.
> NAML<http://osgeo-org.1560.n6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicName

Re: [gdal-dev] How to identify a point is belong to a polygon ?

2012-07-23 Thread Chaitanya kumar CH
Tai,

If your rebuild was successful with geos, the only reason for you to get
the error is that the application is accessing the wrong libraries
somewhere in your system. Do a clean rebuild and make sure the
LD_LIBRARY_PATH and GDAL_DATA are set correctly.

On Tue, Jul 24, 2012 at 7:37 AM, taibc  wrote:

> Thanks Mateusz,
>
> I edited the nmake.opt by adding below lines:
>
> GEOS_DIR = C:/geos-3.3.5
> GEOS_LIB = $(GEOS_DIR)/src/geos_c_i.lib
> GEOS_CFLAGS = -I$(GEOS_DIR)/capi -I$(GEOS_DIR)/include/geos -DHAVE_GEOS
>
> Then, I rebuilt GDAL, but still got the error: "GEOS support not enable".
>
> Kind regards,
>
> Tai
>   --
> *From:* Mateusz Loskot [via OSGeo.org] <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4990235&i=0>
> >
> *To:* taibc <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4990235&i=1>>
>
> *Sent:* Monday, July 23, 2012 5:56 PM
> *Subject:* Re: How to identify a point is belong to a polygon ?
>
>  On 23 July 2012 11:52, taibc <[hidden email]> wrote:
> > I installed GEOS succesfful, and copy file geos.dll into my project. But
> I
> > still got the error: "GEOS support not enable" when using the method
> > "Within"
> >
> > Are there something wrongs ?
>
> You need to edit nmake.opt and rebuild GDAL.
> Check this thread:
> http://lists.osgeo.org/pipermail/gdal-dev/2010-March/023829.html
>
> Best regards,
> --
> Mateusz Loskot, http://mateusz.loskot.net
> ___
> gdal-dev mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://osgeo-org.1560.n6.nabble.com/How-to-identify-a-point-is-belong-to-a-polygon-tp4989501p4990029.html
>  To unsubscribe from How to identify a point is belong to a polygon ?, click
> here.
> NAML<http://osgeo-org.1560.n6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
> --
> View this message in context: Re: How to identify a point is belong to a
> polygon 
> ?<http://osgeo-org.1560.n6.nabble.com/How-to-identify-a-point-is-belong-to-a-polygon-tp4989501p4990235.html>
>
> Sent from the GDAL - Dev mailing list 
> archive<http://osgeo-org.1560.n6.nabble.com/GDAL-Dev-f3742093.html>at 
> Nabble.com.
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] geotransform rotation and gdal_merge

2012-07-23 Thread Chaitanya kumar CH
Dave,

The reason you have lat/lon values for each pixel is because they may not
be aligned exactly.
Even though it is not very 'efficient', you have to define the GCPs for
each pixel with the lat/lon values of that pixel. Then you use gdalwarp
while forcing use of these GCPs to combine all the images.

How are the lat/lon values stored?

On Sun, Jul 22, 2012 at 7:44 PM, David Hoese  wrote:

>  Sure, pixels were probably not the best word to use. I have 15
> points(elements) per scan line per "variable" directly from an aircraft
> instrument.  So I might have a 15 element array of brightness temperatures,
> a 15 element array of latitudes corresponding to those points in the BT
> array, and another 15 element array of longitudes corresponding to those
> points in the BT array.  So the first element in the brightness
> temperature(BT[0]) array represents an area of the earth located at
> lon[0],lat[0] (I'm actually not sure if its the center of the area or the
> corner, but at the moment that doesn't matter).
>
> Does that make sense?
>
> -Dave
>
>
> On 7/21/12 9:46 AM, Chaitanya kumar CH wrote:
>
> Dave,
>
> You said that you have lat/lon values for each pixel. Can you explain?
>
> On Fri, Jul 20, 2012 at 8:44 PM, David Hoese  wrote:
>
>>  I'm attempting to put aircraft scan data into geotiffs (1-3 scanlines
>> each) and then use gdal_merge.py to combine them into one large geotiff
>> that has the entire aircraft's path.  The scan lines are 15 pixels wide and
>> taken every 10 seconds, the geotiffs are wgs84 lat/lon, and I have lat/lon
>> values for each pixel.  To handle the case when the aircraft isn't flying
>> straight north I think I have to use the 2 rotation parameters in the
>> affine geotransform, is that right?  I don't have any test cases, but I
>> think if I don't use rotation anything that reads the geotiff will think
>> that the image is square(aligned) in lat/lon space.
>>
>> Whether or not I need to use this, can someone explain to me how to use
>> the rotation coefficients?  What are the actual values of the coefficients
>> supposed to be?  I couldn't find a good example and I couldn't get any
>> basic situations to make sense, like a 2x3 array turned 45 degrees.  I used
>> these equations:
>>
>> Xgeo = GT(0) + Xpixel*GT(1) + Yline*GT(2)
>> Ygeo = GT(3) + Xpixel*GT(4) + Yline*GT(5)
>>
>>
>> And lastly, does gdal_merge.py handle rotation?  I checked the source and
>> it doesn't ever seem to use elements 2 and 4 in its calculations.
>>
>> Thanks for any help.
>>
>> -Dave
>>
>> ___
>> gdal-dev mailing list
>> gdal-dev@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
>
>
> --
> Best regards,
> Chaitanya kumar CH.
>
> +91-9494447584
> 17.2416N 80.1426E
>
>
>


-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] geotransform rotation and gdal_merge

2012-07-21 Thread Chaitanya kumar CH
Dave,

You said that you have lat/lon values for each pixel. Can you explain?

On Fri, Jul 20, 2012 at 8:44 PM, David Hoese  wrote:

>  I'm attempting to put aircraft scan data into geotiffs (1-3 scanlines
> each) and then use gdal_merge.py to combine them into one large geotiff
> that has the entire aircraft's path.  The scan lines are 15 pixels wide and
> taken every 10 seconds, the geotiffs are wgs84 lat/lon, and I have lat/lon
> values for each pixel.  To handle the case when the aircraft isn't flying
> straight north I think I have to use the 2 rotation parameters in the
> affine geotransform, is that right?  I don't have any test cases, but I
> think if I don't use rotation anything that reads the geotiff will think
> that the image is square(aligned) in lat/lon space.
>
> Whether or not I need to use this, can someone explain to me how to use
> the rotation coefficients?  What are the actual values of the coefficients
> supposed to be?  I couldn't find a good example and I couldn't get any
> basic situations to make sense, like a 2x3 array turned 45 degrees.  I used
> these equations:
>
> Xgeo = GT(0) + Xpixel*GT(1) + Yline*GT(2)
> Ygeo = GT(3) + Xpixel*GT(4) + Yline*GT(5)
>
>
> And lastly, does gdal_merge.py handle rotation?  I checked the source and
> it doesn't ever seem to use elements 2 and 4 in its calculations.
>
> Thanks for any help.
>
> -Dave
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] How to identify a point is belong to a polygon ?

2012-07-21 Thread Chaitanya kumar CH
Tai,

Pease refer to http://trac.osgeo.org/geos/

On Sat, Jul 21, 2012 at 2:06 PM, taibc  wrote:

> Thanks Chaitanya,
>
> I tried to install GEOS on Window.
>
> But I got below error: NMAKE fatal error U1077 return code '0x2'
>
> Detail is:
>
> algorithm\LineIntersector.cpp(671) : error C3861: 'isnan': identifier not
> found
> algorithm\LineIntersector.cpp(672) : error C3861: 'isnan': identifier not
> found
> algorithm\LineIntersector.cpp(680) : error C3861: 'isnan': identifier not
> found
> algorithm\LineIntersector.cpp(681) : error C3861: 'isnan': identifier not
> found
> algorithm\LineIntersector.cpp(736) : error C3861: 'isnan': identifier not
> found
> algorithm\LineIntersector.cpp(737) : error C3861: 'isnan': identifier not
> found
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
> 10.0\VC\BI
> N\cl.EXE"' : return code '0x2'
> Stop.
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
> 10.0\VC\BI
> N\nmake.EXE"' : return code '0x2'
> Stop.
>
>
> chaitanya_ch wrote
> >
> > Tai,
> >
> > GDAL needs GEOS to perform these geometry functions. Make sure you
> install
> > that.
> >
> > On Sat, Jul 21, 2012 at 12:19 PM, taibc  wrote:
> >
> >
> >
>
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.n6.nabble.com/How-to-identify-a-point-is-belong-to-a-polygon-tp4989501p4989779.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

  1   2   3   4   5   6   7   8   >