Thursday, August 14, 2014

Excluding PolygonZ and M in shape file using ArcGIS


To do this using tools available in ArcMap follow these steps. 

Locate the following tool - 
ArcToolbox > Conversion Tools > To Shapefile > Feature Class To Shapefile (multiple) 

Launch the tool and add your Polygon ZM shapefiles to the input features. 

Select an 'Output Folder' 

Click on the 'Environments...' button at the bottom of the dialog box. To the right of the 'OK' button. 

Click on the 'General Settings' text. 

You should see two fields marked 'Output has Z Values' and 'Output has M Values'. 

Set both fields to 'Disabled'. 

Click 'OK' to exit the Environments Settings then click 'OK' to run the tools. 

You should now have copies of your original shapefiles, without Z & M values in your new folder. 

Courtesy
http://forums.esri.com/Thread.asp?c=93&f=1730&t=296920

Friday, August 8, 2014

Geocoding Postal code

http://www.gpsvisualizer.com/geocoder/

Allows to geocode 5 postal code at a time.


Another link where all Canadian postal codes with Longitude Latitude included in single .gz file

http://geocoder.ca/?freedata=1

Wednesday, July 23, 2014

Using Table variables in SSIS Package

Issue:

When declaring and using T-SQL table variables in SSIS pacakge results in zero rows results.

Solution:
In the query under OLEDB source before actual query execution use "SET NOCOUNT ON".


Friday, May 9, 2014

Aggregating Spatial Data


Spatial table data can be aggregate such as to get a high level map.  This code works for tables in SQL 2012.

SELECT    [Column Name]    ,geometry::UnionAggregate(geom.MakeValid()) AS goem
FROM             
GROUP BY [Column Name]

Friday, September 7, 2012

Dynamic Dimension Security MDX Error

Getting errors:

Check MDX script syntax failed because of the following error:
----------------------------------
An error occurred in the MDX script for the dimension attribute permission's allowed member set: The dimension '[Dim Employee]' was not found in the cube when the string, [Dim Employee].[LoginID].[CORP\Name], was parsed.

Solution:
When you set up your role, use the following MDX for the "Allowed member set" for the "User Name" attribute of the "Dim User" Dimension (not the Cube Dimension, the regular Dimension):
STRTOSET("[Dim User].[User Name].["+Username+"]")

You do NOT need to enable Visual Totals!

The other thing you need to set in your role is the "Allowed member set" for the "Dim Reseller" CUBE Dimension. This is important. If you put the security on the regular "Dim Reseller" Dimension, it doesn't seem to work. You have to secure the CUBE Dimension for "Dim Reseller" (I guess this is because only the Cube Dimension knows about the relationships defined for the cube)? Anyway, set the allowed member set to:
EXISTS(
[Dim Reseller].[Dim Reseller].Members,
STRTOSET("[Dim User].[User Name].["+Username+"]"),
'Fact Reseller User'
)


This time you DO need to enable Visual Totals (at least if you want to restrict the FactResellerSales data).

Referenced from Comments from:
http://hccmsbi.blogspot.ca/2007/08/implementing-user-specific-security-in.html

Friday, August 3, 2012

Activate SSRS subscription report on demand

I usually do this to run subscription based report based on SSIS package routine steps. This enables me to trigger subscription based report on demand when data has been refreshed on my Data warehouse.

Run this on Report server.

DECLARE @EVENTData varchar(100)
select @EVENTData=SubscriptionID from dbo.Subscriptions
where Description = ['Report subscription name']

PRINT @EVENTData

exec ReportServerDB.dbo.AddEvent @EventType='TimedSubscription', @EventData=@EVENTData

Thursday, May 10, 2012

Issue: Browsing HTML file on Sharepoint 2010 prompt to download


Issue: When you try open a aspx/html/pdf or other such files from your SharePoint Foundation 2010 site; you are prompted for downloading the file rather than opening the file in Browser.
Resolution:
This is an enhanced feature in SharePoint Foundation 2010 and IE8.  Microsoft intentionally locked browser handling to strict to avoid malicious code execution using HTML and Java script object model. In the previous versions of SharePoint; you could open the files directly.  By default; the browser file handling option is set to strict in Central Administration
To change this setting; you need to follow the steps given below.  Please note that the steps needs to be performed in the Central Administration; which is available in your SharePoint Server.
1.    Goto Web Application and Select the WebApplication under which the Site Collection and files are located.
2.   Click on General Settings from the top “Ribbon”.
3.   Select General Setting
4.   Locate the section “Browser File Handling”
5.   Change it to Permissive.