<div dir="ltr"><div>Javier,</div><div>Here are a couple of links on the shapefile format.</div><div>You can also convert to geopackage, install the sqlite obdc connector , and connect to the geopackage as a ODBC source in Access.</div><div><br></div><div><br></div><div><br></div><a href="https://en.wikipedia.org/wiki/Shapefile#:~:text=The%20shapefile%20format%20is%20a,information%20system%20(GIS)%20software.&text=The%20shapefile%20format%20can%20spatially,wells%2C%20rivers%2C%20and%20lakes">https://en.wikipedia.org/wiki/Shapefile#:~:text=The%20shapefile%20format%20is%20a,information%20system%20(GIS)%20software.&text=The%20shapefile%20format%20can%20spatially,wells%2C%20rivers%2C%20and%20lakes</a>.<br><div><br></div><div><a href="http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf">http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf</a><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 29, 2020 at 5:28 PM <<a href="mailto:javier.valencia@vtgonline.com">javier.valencia@vtgonline.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_5070475898136814739WordSection1"><p class="MsoNormal"><span style="color:rgb(31,73,125)">Thank you so much Karsten,<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">I am indeed creating the 3 files, in fact 5 files: Test.cpg, Test.dbf, Test.prj, Test.shp and Test.shx<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">How are the SHP and DBF file related to each other? It cannot be the OBJECTID value since I when the values is nulled it still display the line but in a different color and with the OBJECTID column as NULL. Hmmm….<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">What we are doing is merging smaller segment (city blocks) into larger segments (0.5 to 1 mile long) and the entire process is done on a separate database since there is a lot of programming going on to merge the segments and the data for the merged segment can be added, averaged, max or min selected or other calculations for over 100 columns/fields and all the programming to do this has already been done, we just need to display the map with segment already merged in on color and the segment to be merged on a separate color. It would take a lot of effort to reprogram it do it all in QGIS and at this time my expertise on Qgis is pretty limited…as you can tell. </span><span style="font-family:Wingdings;color:rgb(31,73,125)"><span>L</span></span><span style="color:rgb(31,73,125)"><u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">The interesting part is when I edit records, the table does take changes to some other fields but it always sets the one field to NULL. I have tried taking a copy of just the DBF file and placing it on a separate directory and making the changes to that file with the same results. Also, the segments still display but when using the information tool the OBJECTID shows as NULL. Perhaps I can use this to show the segments with the OBJECTD column set to NULL as being already used and the ones with a values as available.<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">I will play using MS Access to do the editing since I can easily connect to it and work with it from R:Base.<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">I am new to this board and looks like this response goes to the Forum and to you.<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">Again, thank you for the help, much appreciated.<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)"><u></u> <u></u></span></p><div><p class="MsoNormal"><span style="color:rgb(31,73,125)">Best regards,<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">Javier Valencia, PE<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">14315 S. Twilight Ln.<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">Olathe, KS 66062<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">Cell: 913-915-3137<u></u><u></u></span></p></div><p class="MsoNormal"><span style="color:rgb(31,73,125)"><u></u> <u></u></span></p><div><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in"><p class="MsoNormal" style="margin-left:0.5in"><b><span style="font-size:10pt;font-family:Tahoma,sans-serif">From:</span></b><span style="font-size:10pt;font-family:Tahoma,sans-serif"> karsten [mailto:<a href="mailto:karsten@terragis.net" target="_blank">karsten@terragis.net</a>] <br><b>Sent:</b> Tuesday, December 29, 2020 2:40 PM<br><b>To:</b> <a href="mailto:javier.valencia@vtgonline.com" target="_blank">javier.valencia@vtgonline.com</a>; <a href="mailto:qgis-us-user@lists.osgeo.org" target="_blank">qgis-us-user@lists.osgeo.org</a><br><b>Subject:</b> RE: [Qgis-us-user] DBF table for SHP geo file<u></u><u></u></span></p></div></div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p><p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:Arial,sans-serif;color:navy">Hi Javier,</span><span style="font-size:12pt;font-family:"Times New Roman",serif"><u></u><u></u></span></p><p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:12pt;font-family:"Times New Roman",serif"> <u></u><u></u></span></p><p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:Arial,sans-serif;color:navy">> >> </span><span style="font-size:12pt;font-family:"Times New Roman",serif">I was provide an application in ArcInfo SHP format and the data appears to be stored in a DBF file (Dbase)</span><span style="font-size:10pt;font-family:Arial,sans-serif;color:navy"> </span><span style="font-size:12pt;font-family:"Times New Roman",serif"><u></u><u></u></span></p><p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:Arial,sans-serif;color:navy">Yes it is in dbf format</span><span style="font-size:12pt;font-family:"Times New Roman",serif"> </span><span style="font-size:10pt;font-family:Arial,sans-serif;color:navy">.</span><span style="font-size:12pt;font-family:"Times New Roman",serif"><u></u><u></u></span></p><p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:12pt;font-family:"Times New Roman",serif"> <u></u><u></u></span></p><p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:Arial,sans-serif;color:navy"> >>> </span>The first column in the table is a field OBJECTID which I believe might hold the line geometric information<span style="font-size:10pt;font-family:Arial,sans-serif;color:navy"> </span><u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:Arial,sans-serif;color:navy">Nope. The geometry is in the *.shp file , while the *.shx is the index that connects the. Thus, editing the *.dbf does not touch the geometries</span> <span style="font-size:10pt;font-family:Arial,sans-serif;color:navy">. So one 'shape* is a file is in fact (at a minimum) the three files - the *.shp, a *.dbf and the *.shx file...</span><u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in"> <u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:Arial,sans-serif;color:navy"> >>> </span>I created a subset of the map, Test.DBF, with just a few columns including the OBJECTID column and a columns called “merged” that I need to edit from an external application<span style="font-size:10pt;font-family:Arial,sans-serif;color:navy"> </span><u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:Arial,sans-serif;color:navy">That could work if you actually used a selection in QGIS to do this and have the saved that selected trifecta of the files </span> <span style="font-size:10pt;font-family:Arial,sans-serif;color:navy">Test.shp, Test.dbf and Test.shx . If you only created test.dbf instead that will not work. In that case recreate a new subset with those 3 files mentioned above (cerate selection then save layer (only selected) to a new shape file)</span><u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in"> <u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:Arial,sans-serif;color:navy"> >>> </span>I ATTACH the Test.dfb table using an external database (R:Base) and I can see the column data just fine, the “merged” column show all values as NULL.<u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in">When I change the value of “merged” from NULL to “Y” either via a grid or command, it changes it correctly but also changes the value of OBJECTID to NULL. When I open the map in QGIS and enable the layer “Test”, the lines still display but now the column OBJECT ID shows as NULL.<span style="font-size:10pt;font-family:Arial,sans-serif;color:navy"> >>></span><u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:Arial,sans-serif;color:navy">I am not exactly sure how you are doing that in detail but in QGIS one can not usually edit joined data from another source (like other dbf files join on an id field, or joined xls(x) Excel files or csv data that where joined. The way to do it is to either </span><u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in"> <u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:Arial,sans-serif;color:navy">1.) edit the data outside QGIS and then join that table to the shape file it in QGIS (use the join tab) , or </span><u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in"> <u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:Arial,sans-serif;color:navy">2.) join the data in QGIS and then save the entire dataset (with those joined data) to a new shape file. If going that second route one can then edit the data easily inside QGIS. One good way to edit the data in QGIS is also using the field calculator - see here e.g. <a href="https://docs.qgis.org/3.16/en/docs/user_manual/working_with_vector/attribute_table.html?highlight=calculator#using-the-field-calculator" target="_blank">https://docs.qgis.org/3.16/en/docs/user_manual/working_with_vector/attribute_table.html?highlight=calculator#using-the-field-calculator</a> . </span><u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in"> <u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:Arial,sans-serif;color:navy">Cheers</span><u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:Arial,sans-serif;color:navy">Karsten</span><u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in"> <u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:Arial,sans-serif;color:navy"><a href="http://www.terragis.net" target="_blank">www.terragis.net</a></span><u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in"> <u></u><u></u></p></div></div>_______________________________________________<br>
Qgis-us-user mailing list<br>
<a href="mailto:Qgis-us-user@lists.osgeo.org" target="_blank">Qgis-us-user@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/qgis-us-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-us-user</a><br>
</blockquote></div>