This may be appropriate for the geotools user list where the svg external
graphics factory is implemented.

When stepping through with the debugger can you check the bounds and
rescaling produced here
<https://github.com/geotools/geotools/blob/a652aace1b6dc2d6777f55a39956737af1d2cdc3/modules/plugin/svg/src/main/java/org/geotools/renderer/style/svg/SVGGraphicFactory.java#L251-L266>
:

            // defines target width and height for render, based on the SVG
bounds
            // and the specified desired height (if height is not provided,
then
            // SVG bounds are used)
            Rectangle2D bounds = svg.bounds;
            double targetWidth = bounds.getWidth();
            double targetHeight = bounds.getHeight();
            if (size > 0) {
                double shapeAspectRatio =
                        (bounds.getHeight() > 0 && bounds.getWidth() > 0)
                                ? bounds.getWidth() / bounds.getHeight()
                                : 1.0;
                targetWidth = shapeAspectRatio * size;
                targetHeight = size;
            }
            this.width = (int) Math.round(targetWidth);
            this.height = (int) Math.round(targetHeight);

--
Jody Garnett


On Tue, 8 Feb 2022 at 02:23, Aniket Joshi <aniket.jo...@zs.com> wrote:

> Hi Team,
>
> We are trying to render SVG marker using external graphic link, but the
> final SVG image is getting clipped.
>
> For more details please visit below link,
>
> https://stackoverflow.com/questions/71031596/rendering-clipped-svg-image-using-geotools-version-26-2
>
>
>
> Your help would be apricated.
>
>
>
> Regards,
>
> *Aniket Joshi*
> Contractor
> ZS Associates India Pvt. Ltd.
> World Trade Center, Tower 3, Kharadi, Pune 411014, Maharashtra, India
>
> www.zs.com
>
> ZS  Impact where it matters.
>
>
>
>
> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to
> this list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines:
> http://geoserver.org/comm/userlist-guidelines.html
>
> If you want to request a feature or an improvement, also see this:
> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>
>
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to