EasyGIS.NET icon indicating copy to clipboard operation
EasyGIS.NET copied to clipboard

Creating CustomRendeder in Runtime

Open dusko23 opened this issue 1 year ago • 3 comments

1. I would appreciate a hint on how to Create CustomRendeder in Runtime. (If possible?) I want to keep parameters in the database and when creating a shape file from the database Custom Rendeder will be created.

2. I am unsure which RendederSettings properties can be used in Custom Rendeder. Commenting on that is welcome.

dusko23 avatar Oct 29 '23 22:10 dusko23

I have checked Example 8 and it appears that creating custom renderer for color and pointsymbol is doable. I have noticed that there is matching List entry for each record in shape file. If there are million of records then we have million of image instance inside a list.

image

Is there any other way to reduce then number of images in a list because there are only 6 of base images in Example 8?

dusko23 avatar Oct 30 '23 09:10 dusko23

Example8 is intended to show a simple way of using custom RenderSettings - as long as you implement the ICustomRenderSettings interface method to return an image for a given record number you can return an image from a file, database or whichever way you see fit.

Also just to be clear in the example you reference there are many more records than the six images - the images for each record represents a category looked up from the record attributes in the Shapefile’s dbf file. If there were 1 million records the list contains references to image objects which would be 4MB(8MB if 64bit) not 1 million individual image objects.

wfletcher avatar Oct 31 '23 11:10 wfletcher

Thanks for clarifying the reference bit, C# is not my "mother language." :-) Can the same logic be applied to Font, LineStyle, LineType, LineWidth as well as well?

dusko23 avatar Oct 31 '23 12:10 dusko23