[gdal-dev] Re: PCIDSK .pix feature attribute information not visible in geomatica.
Hi, I'm still not able to get past this problem. Can someone suggest any pointers as to which aspect of the conversion should I look into.. Any help is appreciated. Thanks, Shashi -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/PCIDSK-pix-feature-attribute-information-not-visible-in-geomatica-tp5871388p5880861.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] Re: PCIDSK .pix feature attribute information not visible in geomatica.
Hi, Apologies for the delay in replying and thanks for the response. @Frank: I did try to open the ogr_polygon.pix in geomatica. The different attribute fields are empty, when viewing in the attribute manager. @Chaitanya: Yes I did try using the ogr2ogr Utility. For the sake of test, I used the utility to convert a .shp file to .pix and back to .shp. During the transformation, the attribute information is lost. Thanks, Shashi. On Tue, Jan 4, 2011 at 9:57 AM, Chaitanya kumar CH [via OSGeo.org] ml-node+5887620-911473961-309...@n2.nabble.comml-node%2b5887620-911473961-309...@n2.nabble.com wrote: Shashi, Did you try the ogr2ogr utility? On Mon, Jan 3, 2011 at 8:22 PM, shashishaw [hidden email]http://user/SendEmail.jtp?type=nodenode=5887620i=0 wrote: Hi, I'm still not able to get past this problem. Can someone suggest any pointers as to which aspect of the conversion should I look into.. Any help is appreciated. Thanks, Shashi -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/PCIDSK-pix-feature-attribute-information-not-visible-in-geomatica-tp5871388p5880861.htmlhttp://osgeo-org.1803224.n2.nabble.com/PCIDSK-pix-feature-attribute-information-not-visible-in-geomatica-tp5871388p5880861.html?by-user=t Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list [hidden email] http://user/SendEmail.jtp?type=nodenode=5887620i=1 http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Best regards, Chaitanya kumar CH. /tʃaɪθənjə/ /kʊmɑr/ +91-9494447584 17.2416N 80.1426E ___ gdal-dev mailing list [hidden email] http://user/SendEmail.jtp?type=nodenode=5887620i=2 http://lists.osgeo.org/mailman/listinfo/gdal-dev -- View message @ http://osgeo-org.1803224.n2.nabble.com/PCIDSK-pix-feature-attribute-information-not-visible-in-geomatica-tp5871388p5887620.html To unsubscribe from PCIDSK .pix feature attribute information not visible in geomatica., click herehttp://osgeo-org.1803224.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5871388code=c2hhc2hpc2hhd0BnbWFpbC5jb218NTg3MTM4OHwtMjAxODE2NTU3Ng==. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/PCIDSK-pix-feature-attribute-information-not-visible-in-geomatica-tp5871388p5887836.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] PCIDSK .pix feature attribute information not visible in geomatica.
Hi, I am using the current trunk of GDAL/OGR version(v1.7.3, revision 21324) to convert a .shp file to .pix file. The steps used are taken from the online tutorial and are as below. 1. // Open the datasource. OGRDataSource* pSrc = OGRSFDriverRegistrar::Open(input.shp,FALSE); 2. // Read the source layer. OGRLayer* pSrcLayer = pSrc-GetLayer(0); 3. // Initialise the output driver. const char* pszDriverName = PCIDSK; OGRSFDriver* pDriver = NULL; pDriver = OGRSFDriverRegistrar::GetRegistrar() -GetDriverByName(pszDriverName); 4. // Test capability. int result = pDriver-TestCapability(CreateDataSource); 5. // Create the data source. OGRDataSource* pDst = pDriver-CreateDataSource(out.pix, NULL ); 6. // Create the output layer. OGRLayer* pDstLayer = pDst-CreateLayer(out_layer, pSrcLayer-GetSpatialRef(), pSrcLayer-GetLayerDefn()-GetGeomType()); 7. // Create field definitions for output layer. for( int i = 0; i pSrcLayer-GetLayerDefn()-GetFieldCount(); i++){ OGRFieldDefn dstFieldDefn(pSrcLayer-GetLayerDefn()-GetFieldDefn(i)); // Create the destination field. OGRErr err = pDstLayer-CreateField(dstFieldDefn); } 8. // Read and set the features. pSrcLayer-ResetReading(); OGRFeature* pSrcFeature = NULL; while( NULL != (pSrcFeature = pSrcLayer-GetNextFeature())){ // Create the destination feature. OGRFeature* pDstFeature = OGRFeature::CreateFeature(pDstLayer-GetLayerDefn()); err = pDstFeature-SetFrom(pSrcFeature,FALSE); // Add the feature to the layer. err = pDstLayer-CreateFeature(pDstFeature); OGRFeature::DestroyFeature(pDstFeature); OGRFeature::DestroyFeature(pSrcFeature); } 9. // Cleanup OGRDataSource::DestroyDataSource(pDst); OGRDataSource::DestroyDataSource(pSrc); NOTE: Error handling has been ignored. On viewing the .pix output file in PCI Geomatica(Focus), the geometry is correctly displayed, however the attribute information(using the Attribute Manager) does not show any details(empty fields). The .pix when viewed in a text editor does show the attribute information that is present in the .shp file. Lastly, when I read the generated output .pix file using the GDAL/OGR apis, I am able to correctly read the feature attribute information. Are there some additional steps to be performed in order to correctly set the attributes for a given file so that they are displayed in PCI Geomatica. Thanks, Shashi. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/PCIDSK-pix-feature-attribute-information-not-visible-in-geomatica-tp5871388p5871388.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