[gdal-dev] Asking about feature field types of Shape File (SHP) ?

2014-06-05 Thread taibc
Hi everyone, I created the shape file by usinge the feature filed type: OFTInteger. But when I open the file in Arcgis (ArcCatalog) the data type is: Double (not integer). Do you know how to fix this (I want it is Int) ? Thanks and regards, Tai -- View this message in context:

[gdal-dev] How to get the line style scale factor of Line (using DGNLib) ?

2013-08-08 Thread taibc
Hi everyone, I am trying to read custom lines from the dgn file by using DGNLib (DGNElemMultiPoint,...). But I don't know how know or get the line style scale factor of Line ? Please see this link for more detail about scale factor

[gdal-dev] Using OGRLayer::GetNextFeature() to read Dgn file ?

2013-06-14 Thread taibc
Hi everyone, I am trying read features in a dgn file and convert to shape file. Everything is ok before I adding the last while loop. After adding this while loop, I can't exit the program. Please see my below codes. Do you know why ? OGRRegisterAll(); OGRDataSource *poDS, *poSHPDS;

Re: [gdal-dev] Using OGRLayer::GetNextFeature() to read Dgn file ?

2013-06-14 Thread taibc
I resolved this error. Thanks and regards, -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Using-OGRLayer-GetNextFeature-to-read-Dgn-file-tp5060084p5060120.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___

Re: [gdal-dev] Using OGRLayer::GetNextFeature() to read Dgn file ?

2013-06-14 Thread taibc
The problem is: after the last while loop. I need to set SetSpatialFilter and Feature again (The spatialfilter that used in the previous while loop), by using below codes: poLayer-SetSpatialFilter (poGeometry); poLayer-SetNextByIndex (index2-1); Kind regards, Tai -- View this message in

Re: [gdal-dev] How to create feature LineString in a Polygon shape file layer ?

2013-06-09 Thread taibc
Yes. I will create a new shapefile for LineString type. Thanks and regards, Tai -- View this message in context: http://osgeo-org.1560.x6.nabble.com/How-to-create-feature-LineString-in-a-Polygon-shape-file-layer-tp5058827p5059000.html Sent from the GDAL - Dev mailing list archive at

[gdal-dev] How to create feature LineString in a Polygon shape file layer ?

2013-06-08 Thread taibc
Hi everyone, I used below codes to create ShapeFile layer OGRDataSource *poDS, *poSHPDS; OGRLayer *poSHPLayer; .. poSHPLayer = poSHPDS-CreateLayer (shpFileName, NULL, wkbPolygon , NULL); And I used below codes to create feature: OGRFeature *poSHPFeature; poSHPFeature =

Re: [gdal-dev] Asking about Convert Dgn to Shp and OGRLayer::SetSpatialFilter

2013-06-04 Thread taibc
Hi Ari, So do you think the dgn file is wrong ? Thanks and kind regards, Tai -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Asking-about-Convert-Dgn-to-Shp-and-OGRLayer-SetSpatialFilter-tp5057280p5057658.html Sent from the GDAL - Dev mailing list archive at Nabble.com.

Re: [gdal-dev] Asking about Convert Dgn to Shp and OGRLayer::SetSpatialFilter

2013-06-02 Thread taibc
Thanks Jukka, I uploaded the dgn file and shp files (after converting) at the link: http://www.mediafire.com/?aw830x9629j3x9q http://www.mediafire.com/?aw830x9629j3x9q Could you please download and check it ? Thanks and regards, -- View this message in context:

[gdal-dev] How to check are there any OGRGeometry (polygons) within an OGRGeometry (polygon) ?

2013-06-02 Thread taibc
Hi everyone, Please see my image: http://osgeo-org.1560.x6.nabble.com/file/n5057389/Multipolygon.png I used the below statements to get Geometry: OGRGeometry *poGeometry; poGeometry = poFeature-GetGeometryRef(); Do you know how to check whether the Polygon 1 (geometry) is empty (or include

[gdal-dev] Asking about Convert Dgn to Shp and OGRLayer::SetSpatialFilter

2013-06-01 Thread taibc
Hi, I used the this function: http://osgeo-org.1560.x6.nabble.com/file/n4989766/Source1.cpp http://osgeo-org.1560.x6.nabble.com/file/n4989766/Source1.cpp to convert my dgn file to shp file. But, after converting, I can't select the small polygon (that is contained in another polygon, I used

[gdal-dev] Can't convert geometry from Dgn file to Shape file ?

2013-05-31 Thread taibc
Hi everyone, I am using below codes to try convert geometry from a Dgn file to Shape file. But, I can't exit the FeatureReading loop: void convert() { OGRRegisterAll(); OGRDataSource *poDS, *poSHPDS; const char *pszDriverName = ESRI Shapefile; OGRSFDriver *poDriver;

[gdal-dev] How to identify custom lines in .Dgn file using DgnLib ?

2013-03-04 Thread taibc
Hi everyone, I am getting a problem, I can't identify custom lines in .Dgn file. As you know, in Microstation 7, we can assign the style value of lines from 0 to 7. But if lines are customed lines, they always have the style value is 0. How can we identify them ? Please find the attached

Re: [gdal-dev] How to convert a .dgn file into image (jpg or bmp)

2012-09-03 Thread taibc
Thanks Jukka Rahkonen, I will find out more your suggestion link. Kind regards, Tai -- View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-convert-a-dgn-file-into-image-jpg-or-bmp-tp4998992p4999564.html Sent from the GDAL - Dev mailing list archive at Nabble.com.

[gdal-dev] How to convert a .dgn file into image (jpg or bmp)

2012-08-31 Thread taibc
Hi friends, Do you know how to convert (or save) a .dgn file into a image (such as .jpg or bmp) ? (by using C/C++ or C#) I am wanting write a method to do that, so I can store the image into my database (SQL Server). Thanks for your help ! -- View this message in context:

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

2012-07-25 Thread taibc
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

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

2012-07-25 Thread taibc
Hi Chaitanya, I used the blow statements : // To fetch features while( (poFeature = poLayer-GetNextFeature()) != NULL ) { } // To set fields for (int fieldCount = 0; fieldCount poFDefn-GetFieldCount(); fieldCount ++) { } Kind regards, Tai -- View this message in context:

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

2012-07-24 Thread taibc
N\lib.EXE' : return code '0x49d' Stop. Thanks and regards, Tai From: chaitanya_ch [via OSGeo.org] ml-node+s1560n4990261...@n6.nabble.com To: taibc taibc_colt...@yahoo.com Sent: Tuesday, July 24, 2012 12:48 PM Subject: Re: How to identify a point is belong

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

2012-07-24 Thread taibc
Thanks chaitanya, I resolved the errors by downloading GEO-3.2.3 (arrangement of folders in geo-3.2.3 is different from geo-3.3.5), re-build geo and gdal. Kind regards, Tai -- View this message in context:

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

2012-07-24 Thread taibc
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 =

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

2012-07-23 Thread taibc
Thanks Chaitanya, I reported the error there. And waiting for answers. Kind regards, Tai -- View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-identify-a-point-is-belong-to-a-polygon-tp4989501p4989973.html Sent from the GDAL - Dev mailing list archive at Nabble.com.

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

2012-07-23 Thread taibc
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 lt;taibc_coltech@gt; wrote: Hi Chaitanya, I installed GEOS succesfful, and copy file geos.dll into my project. But I still got the error

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

2012-07-23 Thread taibc
From: Mateusz Loskot [via OSGeo.org] ml-node+s1560n4990029...@n6.nabble.com To: taibc taibc_colt...@yahoo.com 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

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

2012-07-23 Thread taibc
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] ml-node+s1560n499024...@n6.nabble.com To: taibc taibc_colt...@yahoo.com Sent: Tuesday

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

2012-07-21 Thread taibc
Hi Chaitanya, I still can't run the method Geometry::Within. And I got the error: GEOS support not enable when trying use this method. Please find the attached file for sample code. http://osgeo-org.1560.n6.nabble.com/file/n4989766/Source1.cpp Source1.cpp About spatial filter, you said that:

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

2012-07-21 Thread taibc
GEOS to perform these geometry functions. Make sure you install that. On Sat, Jul 21, 2012 at 12:19 PM, taibc lt;taibc_coltech@gt; 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

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

2012-07-19 Thread taibc
Hi everyone, Do you know how to identify whether a point (OGRPoint) is belong to a polygon (OGRPolygon) ? (the polygon covers the point) Thanks and regards, Tai -- View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-identify-a-point-is-belong-to-a-polygon-tp4989501.html

[gdal-dev] How to assign Text elements for related shapes (polygon) when reading .DGN files ?

2012-07-18 Thread taibc
Hi friends, When reading .DGN files, I can specify features (include attributes: Type, Level, Text, ColorIndex,...), and geometry (polygon, point) of these features. But, do you know how can we assign (or specify) Text, Level elements for a particular polygon ? For example: The map include many

Re: [gdal-dev] Error LNK1120: 314 unresolved externals - When using Ogr C++ class on Visual Studio 2010

2012-07-16 Thread taibc
wrote 16.07.2012 5:09, taibc пишет: Hi Dmitry, I tried to do that, but still got errors: /Error 36 error LNK2019: unresolved external symbol _CSLPartialFindString referenced in function public: int __thiscall CPLStringList::PartialFindString(char const *)const

Re: [gdal-dev] Error LNK1120: 314 unresolved externals - When using Ogr C++ class on Visual Studio 2010

2012-07-16 Thread taibc
Yes, that's right. I've just done. Thank you. Tai -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Error-LNK1120-314-unresolved-externals-When-using-Ogr-C-class-on-Visual-Studio-2010-tp4988103p4988503.html Sent from the GDAL - Dev mailing list archive at Nabble.com.

[gdal-dev] Error reading from OGR: Unhandled Exception... Access violation reading location 0x00000000

2012-07-16 Thread taibc
Hi friends, I am trying to use OGR classes on VS2010 to read and write from file as the link: http://gdal.org/ogr/ogr_apitut.html But I got an error, please see attached screenshot for details. http://osgeo-org.1560.n6.nabble.com/file/n4988534/error.png Do you know this error ? Thanks and

Re: [gdal-dev] Error reading from OGR: Unhandled Exception... Access violation reading location 0x00000000

2012-07-16 Thread taibc
Yes, thank you. I have another question: When reading the files (.dgn, or .shp), why only have* one layer* (I used the function GetLayerCount()) ? I check these file on Microstation or ArcCatalog, they have many layers. Thanks and regards, Tai -- View this message in context:

Re: [gdal-dev] Error LNK1120: 314 unresolved externals - When using Ogr C++ class on Visual Studio 2010

2012-07-15 Thread taibc
Hi Dmitry, I tried to do that, but still got errors: /Error 36 error LNK2019: unresolved external symbol _CSLPartialFindString referenced in function public: int __thiscall CPLStringList::PartialFindString(char const *)const (?PartialFindString@CPLStringList@@QBEHPBD@Z)

Re: [gdal-dev] Error LNK1120: 314 unresolved externals - When using Ogr C++ class on Visual Studio 2010

2012-07-13 Thread taibc
] ml-node+s1560n4988120...@n6.nabble.com To: taibc taibc_colt...@yahoo.com Sent: Friday, July 13, 2012 1:17 PM Subject: Re: Error LNK1120: 314 unresolved externals - When using Ogr C++ class on Visual Studio 2010 13.07.2012 7:56, taibc пишет: Hi everyone, I am trying to use Ogr C++ class

Re: [gdal-dev] Error LNK1120: 314 unresolved externals - When using Ogr C++ class on Visual Studio 2010

2012-07-13 Thread taibc
Hi, What are exported classes/methods ? I only created a file: main.cpp to show the word Hello, and added Ogr files into my project, then built it. Please see the attached file. My idea is: I will create functions in the main.cpp file that use methods of Ogr class to allow convert .dgn files

Re: [gdal-dev] Error LNK1120: 314 unresolved externals - When using Ogr C++ class on Visual Studio 2010

2012-07-13 Thread taibc
Ok, thank you ! Kind regards, Tai From: Dmitry Baryshnikov [via OSGeo.org] ml-node+s1560n4988142...@n6.nabble.com To: taibc taibc_colt...@yahoo.com Sent: Friday, July 13, 2012 2:44 PM Subject: Re: Error LNK1120: 314 unresolved externals - When using Ogr C

Re: [gdal-dev] Error LNK1120: 314 unresolved externals - When using Ogr C++ class on Visual Studio 2010

2012-07-13 Thread taibc
Hi, Although, I added 'gdal_i.lib' in Properties (Linker -Input-Additional Dependencies) and this file in Debug folder, but I got an other errror: error LNK1104: cannot open file 'gdal_i.lib'   Do you know how to fix it ? Thanks and regards, Tai  

Re: [gdal-dev] Error LNK1120: 314 unresolved externals - When using Ogr C++ class on Visual Studio 2010

2012-07-13 Thread taibc
Baryshnikov [via OSGeo.org] ml-node+s1560n498819...@n6.nabble.com To: taibc taibc_colt...@yahoo.com Sent: Friday, July 13, 2012 5:43 PM Subject: Re: Error LNK1120: 314 unresolved externals - When using Ogr C++ class on Visual Studio 2010 Hi Tai, Please post your code and screenshots of project

Re: [gdal-dev] Can't convert .dgn file to shape file by using ogr2ogr

2012-07-12 Thread taibc
Thanks Even Rouault, I tried as you said, but still got the error: /C:\dc16ogr2ogr Dc16_lines.shp Dc16.dgn -where ORG_GEOMETRY = 'LINESTRING' -nl n Dc16_lines ERROR 1: Failed to identify field:ORG_GEOMETRY Warning 6: Normalized/laundered field name: 'GraphicGroup' to 'GraphicGro' ERROR 1:

Re: [gdal-dev] Can't convert .dgn file to shape file by using ogr2ogr

2012-07-12 Thread taibc
Oh, my mistake - OGR (not ORG). It is sucessful now. Thanks and regards, -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Can-t-convert-dgn-file-to-shape-file-by-using-ogr2ogr-tp4987817p4987916.html Sent from the GDAL - Dev mailing list archive at Nabble.com.

[gdal-dev] Error LNK1120: 314 unresolved externals - When using Ogr C++ class on Visual Studio 2010

2012-07-12 Thread taibc
Hi everyone, I am trying to use Ogr C++ class on Visual Studio 2010. I created an new empty Visual C++ project (Win 32 Console Application). Then added Ogr files into project, then buid it. I got the errors similar as below: /Error 147 error LNK2001: unresolved external symbol private:

[gdal-dev] Can I create a win form program (using C++ or C#) to convert .dgn files to shape files by using ogr2ogr

2012-07-11 Thread taibc
I want to create a win form program (in Visual Studio 2010, C++ or C#) to allow to convert .dgn files into shape files by using ogr2ogr as a library. Then, I will integrate that program into our project. Do you think it is possible ? Are there any one have experiences about this ? Thanks and

[gdal-dev] Can't convert .dgn file to shape file by using ogr2ogr

2012-07-11 Thread taibc
Dear friends, I tried to convert .dgn file to shape files by using ogr2ogr with FWTools Shell as below: ogr2ogr -f ESRI Shapefile Dc16.shp Dc16.dgn but I got an bellow error: /Warning 6: Normalized/laundered field name: 'GraphicGroup' to 'GraphicGro' ERROR 1: Attempt to write non-linestring

Re: [gdal-dev] Can't convert .dgn file to shape file by using ogr2ogr

2012-07-11 Thread taibc
Dear Chaitanya, Please find the attached .dgn file. Thanks and regards, Tai From: chaitanya_ch [via OSGeo.org] ml-node+s1560n4987825...@n6.nabble.com To: taibc taibc_colt...@yahoo.com Sent: Thursday, July 12, 2012 11:10 AM Subject: Re: Can't convert .dgn