Closed smitty1788 closed 7 years ago
Which branch is the code from? 0.10 or the Master branch? Is it a categorised or graduated symbol layer? Lastly (honest) can you past the output from the Qgis Log Messages panel for the plugin. Should help me figure out what it's doing wrong. Thanks
Failed to replicate it with the Open Data off the Washington DC portal...however, I can see that it hasn't added the correct CSS class to any of the homicide class in your example. I've run both categorized and graduated symbologies to no avail. Attached are the log messages for each as an example for you to post back.
2017-01-27T10:06:06 0 model EXPORT start ================================================== 2017-01-27T10:06:06 0 model Title = [2016 Homicides] 2017-01-27T10:06:06 0 model Header = [False] 2017-01-27T10:06:06 0 model Width = [800] 2017-01-27T10:06:06 0 model Height = [600] 2017-01-27T10:06:06 0 model Main layer = [2016Homicides] 2017-01-27T10:06:06 0 model IDField = [GEOID] 2017-01-27T10:06:06 0 model Projection = [Albers] 2017-01-27T10:06:06 0 model Simplify = [] 2017-01-27T10:06:06 0 model Output = [D:\Downloads\Temp] 2017-01-27T10:06:06 0 model Zoom/Pan = [False] 2017-01-27T10:06:06 0 model Legend = [True] 2017-01-27T10:06:06 0 model LegendPos = [Top Left] 2017-01-27T10:06:06 0 model IncExtras = [False] 2017-01-27T10:06:06 0 model Extras = [2016Homicides] 2017-01-27T10:06:06 0 model IncPopup = [True] 2017-01-27T10:06:06 0 model PopupPos = [Bubble] 2017-01-27T10:06:06 0 model Popup = [
NUMPOINTS | {NUMPOINTS} |
2017-01-27T10:06:07 0 model setCategorizedSymbol 2017-01-27T10:06:07 0 model Filter: "NUMPOINTS" = 0 2017-01-27T10:06:07 0 model Filter: "NUMPOINTS" = 1 2017-01-27T10:06:07 0 model Filter: "NUMPOINTS" = 2 2017-01-27T10:06:07 0 model Filter: "NUMPOINTS" = 3 2017-01-27T10:06:07 0 model Filter: "NUMPOINTS" = 4 2017-01-27T10:06:07 0 model Filter: "NUMPOINTS" = 2017-01-27T10:06:07 0 model EXPORT popup data 2017-01-27T10:06:07 0 model EXPORT complete ========================================================
2017-01-27T10:09:17 0 model EXPORT start ================================================== 2017-01-27T10:09:17 0 model Title = [2016 Homicides Graduated Colors] 2017-01-27T10:09:17 0 model Header = [False] 2017-01-27T10:09:17 0 model Width = [800] 2017-01-27T10:09:17 0 model Height = [800] 2017-01-27T10:09:17 0 model Main layer = [2016Homicides] 2017-01-27T10:09:17 0 model IDField = [GEOID] 2017-01-27T10:09:17 0 model Projection = [Albers] 2017-01-27T10:09:17 0 model Simplify = [] 2017-01-27T10:09:17 0 model Output = [D:\Downloads\Temp] 2017-01-27T10:09:17 0 model Zoom/Pan = [False] 2017-01-27T10:09:17 0 model Legend = [False] 2017-01-27T10:09:17 0 model LegendPos = [Top Left] 2017-01-27T10:09:17 0 model IncExtras = [False] 2017-01-27T10:09:17 0 model Extras = [2016Homicides] 2017-01-27T10:09:17 0 model IncPopup = [True] 2017-01-27T10:09:17 0 model PopupPos = [Bubble] 2017-01-27T10:09:17 0 model Popup = [
NUMPOINTS | {NUMPOINTS} |
2017-01-27T10:09:17 0 model setGraduatedSymbol 2017-01-27T10:09:17 0 model Filter: "NUMPOINTS" >= 0.0 and "NUMPOINTS" <= 0.8 2017-01-27T10:09:17 0 model Filter: "NUMPOINTS" >= 0.8 and "NUMPOINTS" <= 1.6 2017-01-27T10:09:17 0 model Filter: "NUMPOINTS" >= 1.6 and "NUMPOINTS" <= 2.4 2017-01-27T10:09:17 0 model Filter: "NUMPOINTS" >= 2.4 and "NUMPOINTS" <= 3.2 2017-01-27T10:09:17 0 model Filter: "NUMPOINTS" >= 3.2 and "NUMPOINTS" <= 4.0 2017-01-27T10:09:17 0 model EXPORT popup data 2017-01-27T10:09:17 0 model EXPORT complete =========================================================
Simon,
Sorry for the delay. I'm not at my work computer at the moment. I was using the 0.10 branch. The symbology was graduated. I will reply with the log as soon as I sit down at the computer when I get into work.
No worries. If you could also add a screenshot of the symbols it would be of help. I suspect the values in the symbology are not correctly interpreted in the plugin, and the values in the data are on the cusp. For example, the plugin uses "NUMPOINTS" >= 0.8 and "NUMPOINTS" <= 1.6 to filter the data and assign the style class to all those records. It might be better for the plugin to use "NUMPOINTS" >= 0.8 and "NUMPOINTS" < 1.6 and on the last graduation just "NUMPOINTS" >= 3.2 Thanks
I think what you just listed might be the exact problem, which I can probably fix myself by just changing the ranges slightly. Here is everything though. Below is the log. I'm also linking the shapefile and style file I used for this.
On another note, I just want to say this plugin is amazing for production flow. I use it for producing probably 4-5 maps per week. Putting together the D3 code by hand is obviously doable, but production would really slow down. This is speeding up everything! Please continue to develop this as its so great! More style options are always welcome too =p
2017-01-27T08:12:59 0 osHelper Windows 2017-01-27T08:13:48 0 model 2.18.3 2017-01-27T08:13:48 0 model 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] 2017-01-27T08:13:48 0 osHelper Windows 2017-01-27T08:13:48 0 osHelper Windows 2017-01-27T08:13:48 0 osHelper Windows 2017-01-27T08:13:48 0 winHelper Query registry for HKEY_CURRENT_USER\Software\node.js\InstallPath 2017-01-27T08:13:48 2 winHelper No more data is available: Software\node.js 2017-01-27T08:13:48 0 osHelper Windows 2017-01-27T08:13:48 0 osHelper Windows 2017-01-27T08:13:48 0 osHelper Windows 2017-01-27T08:13:48 0 winHelper Query registry for HKEY_CURRENT_USER\Software\node.js\InstallPath 2017-01-27T08:13:48 2 winHelper No more data is available: Software\node.js 2017-01-27T08:14:17 0 model EXPORT start ================================================== 2017-01-27T08:14:17 0 model Title = [Homicide in 2015] 2017-01-27T08:14:17 0 model Header = [True] 2017-01-27T08:14:17 0 model Width = [800] 2017-01-27T08:14:17 0 model Height = [600] 2017-01-27T08:14:17 0 model Main layer = [Homicide_CT] 2017-01-27T08:14:17 0 model IDField = [OBJECTID] 2017-01-27T08:14:17 0 model Projection = [Miller] 2017-01-27T08:14:17 0 model Simplify = [] 2017-01-27T08:14:17 0 model Output = [G:\DC Policy Center\Crime Incidents\Maps\Homicide] 2017-01-27T08:14:17 0 model Zoom/Pan = [True] 2017-01-27T08:14:17 0 model Legend = [True] 2017-01-27T08:14:17 0 model LegendPos = [Bottom Left] 2017-01-27T08:14:17 0 model IncExtras = [False] 2017-01-27T08:14:17 0 model Extras = [Homicide_CT] 2017-01-27T08:14:17 0 model IncPopup = [True] 2017-01-27T08:14:17 0 model PopupPos = [Bubble] 2017-01-27T08:14:17 0 model Popup = [
Homicide_3 | {Homicide_3} |
2017-01-27T08:14:18 0 model setGraduatedSymbol 2017-01-27T08:14:18 0 model Filter: "Homicide_3" >= 0.0 and "Homicide_3" <= 0.0 2017-01-27T08:14:19 0 model Filter: "Homicide_3" >= 0.1 and "Homicide_3" <= 1.0 2017-01-27T08:14:19 0 model Filter: "Homicide_3" >= 1.0 and "Homicide_3" <= 2.0 2017-01-27T08:14:19 0 model Filter: "Homicide_3" >= 2.0 and "Homicide_3" <= 3.0 2017-01-27T08:14:19 0 model Filter: "Homicide_3" >= 3.0 and "Homicide_3" <= 4.0 2017-01-27T08:14:19 0 model Filter: "Homicide_3" >= 4.0 and "Homicide_3" <= 5.0 2017-01-27T08:14:19 0 model Filter: "Homicide_3" >= 5.0 and "Homicide_3" <= 6.0 2017-01-27T08:14:19 0 model Filter: "Homicide_3" >= 6.0 and "Homicide_3" <= 7.0 2017-01-27T08:14:19 0 model EXPORT popup data 2017-01-27T08:14:20 0 model EXPORT complete =========================================================
Actually the Qgis source code has it working the other way: QString filterFunc = QString( "%1 > %2 AND %1 <= %3" ) .arg( attrName.replace( "\"", "\"\"" ) ) .arg( mLowerValue ).arg( mUpperValue ); I've altered the plugin to work this way with the condition of ">=" for the lowest range of values. Works now with your example shp (thanks for that). Just checking I haven't regressed anything... Yeah, some more styles would be good, please raise an issue for anything not listed. Currently I'm refactoring the master branch to get some end to end unit tests in place before the Qgis 3 upgrade. Then it'll be back to more styles ;)
Fixing on Master as part of code refactoring
d3 renderer seems to be applying incorrect colors to certain polygons. I have a side by side view below. You can see the polygons colored for 1 in QGIS are being assigned the color for 2 in the generated map. Thanks so much