qgisred / QGISRed

GNU General Public License v2.0
24 stars 7 forks source link

Import SHP Data in QGISRed #45

Closed Daniele24444 closed 3 years ago

Daniele24444 commented 3 years ago

Hello! I'm working with QGISRed and have the problem that when I import data from SHP the following errore appears:

System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) at ?????????????????????????????????????????.?????????????????????????????????????????(IEnumerable1 , String ) at ?????????????????????????????????????????.?????????????????????????????????????????(List1 , Boolean , Boolean , List1 ) at GISRed.ExtendedModel.ExtendedScenario.ReadShpsFolder(Logger logger, String titleFile, List1 shapeFiles, List1 dbfFiles, List`1 fields, Boolean checkIds, Boolean checkCoord, Double tolerance) at GISRed.QGisPlugins.QGisPlugins.ImportFromShps(String dirPath, String networkName, String tempPath, String shapes, String fields, String epsg, String tolerance)

I have tried more times, it does not work, despite all of record have a value. How can i solve? Thanks!

neslerel commented 3 years ago

Hi @Daniele24444,

Could you send me the shapefiles to info@waterpi.com and tell me which layers you are trying to import? With the files I will be able to debug and find the problem.

Thanks!

Daniele24444 commented 3 years ago

Hi @neslerel I sent you the file with WeTransfer. Thanks!

neslerel commented 3 years ago

Hi @Daniele24444,

I just noticed that in current version is not possible to use the same layer field to different element properties... (In your case, you are trying to import 'Tmateriale' in Material and Tag properties). It is not desirable and I fixed it to the following version of the plugin. Now, you can try to not import Tag property.

For other hand, to interpret the materials, the values read on Material field of the layer should be correspond with the acronym of the materials of the project. You can create an empty project, edit the Material table and include in this table the acronyms that you use in your shapefile.

Daniele24444 commented 3 years ago

@neslerel

great!! It works

Thanks!!!