Last post Apr 07, 2016 01:37 AM by huiling123
None
0 Points
1 Post
Mar 30, 2016 02:08 PM|kathyjudd75|LINK
Short question is how do I create bbox dimensions that is proportional to image height and width?
I'm working on a asp.net webservice to generate a map using geoserver. The parameters I have are Point, Width and Height of Image, and zoom level.
My need to calculate the bbox size and position based on the point and the height and width of the parameters.
public void MapCreate( string Point, int Width, int Height, int ZoomLevel ) { // Calculate bbox using sql or c# string bbox = spCalculateFromBBox(); // Url for GeoServer string url = string.Format( "/wms?service=WMS&version=1.1.0&request=GetMap&layers=vvv:ccc&styles=&bbox={0}&width=432&height=468&srs=EPSG:3857&format=image/png", bbox, Width, Height ); }
I was thinking it might be easier to do this in mssql but I have no idea on how to pursue on this.
-- SP Parameters DECLARE @ImgWidth INT; DECLARE @ImgHeight INT; DECLARE @Zoom INT; SET @ImgWidth = 400; SET @ImgHeight = 600; SET @Zoom = 10; DECLARE @p geography; SET @p = geography::Point(40, -40, 4326); -- Calculated bbox from Point with Width and Height SELECT '-12942776.251415756,5411282.980420768,-12942623.377359185,5411435.8544773385'
7 Posts
Apr 07, 2016 01:37 AM|huiling123|LINK
Hi kathyjudd75,
kathyjudd75 I was thinking it might be easier to do this in mssql but I have no idea on how to pursue on this.
Could you please provide the algorithm.
in addition, it's a GIS issue, you could also post your issue on the following for some support about algorithm
http://gis.stackexchange.com/questions
None
0 Points
1 Post
MsSql Create bbox of a point proportional to image height and width
Mar 30, 2016 02:08 PM|kathyjudd75|LINK
Short question is how do I create bbox dimensions that is proportional to image height and width?
I'm working on a asp.net webservice to generate a map using geoserver. The parameters I have are Point, Width and Height of Image, and zoom level.
My need to calculate the bbox size and position based on the point and the height and width of the parameters.
public void MapCreate( string Point, int Width, int Height, int ZoomLevel )
{
// Calculate bbox using sql or c#
string bbox = spCalculateFromBBox();
// Url for GeoServer
string url = string.Format( "/wms?service=WMS&version=1.1.0&request=GetMap&layers=vvv:ccc&styles=&bbox={0}&width=432&height=468&srs=EPSG:3857&format=image/png", bbox, Width, Height );
}
I was thinking it might be easier to do this in mssql but I have no idea on how to pursue on this.
None
0 Points
7 Posts
Re: MsSql Create bbox of a point proportional to image height and width
Apr 07, 2016 01:37 AM|huiling123|LINK
Hi kathyjudd75,
Could you please provide the algorithm.
in addition, it's a GIS issue, you could also post your issue on the following for some support about algorithm
http://gis.stackexchange.com/questions